|
+24
Bump |
|
На
amirhoseinfar1385 →
Please don't hold the 50th and 51st ICPC World Finals simultaneously — collecting signatures, 24 часа назад
+21
I haven't reached to WF yet, but I signed the petition as ICPC contestant |
|
+20
Now here's my gift for Christmas: GTA 6 in browser |
|
+17
Defintely the fastest editorial |
|
+16
Does anyone know how to solve problem B? I thought that there were $$$2^{64}(1-\epsilon)$$$ possible values of $$$x$$$, thus requiring $$$64$$$ queries. |
|
+15
Dear Santa Claus, I want OpenAI and Antropic to go bankrupt in 2027. |
|
+14
Problem H has an interesting linear algebraic interpretation: Spoiler |
|
+14
nigga nigga nigga |
|
+13
bro could not get anybody in discord to join so the cf post was necessary |
|
На
nobodyknows114 →
How do you actually learn a new algorithm and how long does it take to master?, 14 часов назад
+10
Yeah, you must learn in a way that you can teach that topic (e.g. data structures or algorithms) to other people with ease. But I guess you will develop your own approach that is best for you in your journey, just like I did. |
|
+9
enjoy the ban |
|
+9
nice profile picture |
|
+9
count your days, duyminh |
|
+8
400 million submissions and bro is still hungry for more |
|
+8
Bad C |
|
+5
orz nwblanton |
|
+5
I gave this to a bunch of AI agents and they claim to have improved the upper bound:
They couldn't find a superlogarithmic lower bound, so I'm guessing it really is $$$\Theta(\log n)$$$. Alleged proofs are here (no idea what they say): https://gist.github.com/caterpillow/1d2d9b29972fe0a10d6683a67899fd21 |
|
+5
By the way, there is also a direct $$$O(n \log n)$$$ way to do E, instead of the $$$O(n \log^2 n)$$$ small-to-large. I figured I might mention the idea as it wasn't in the editorial and I'm not sure I have seen it discussed in many places, together with the proof. It starts in the same way — keep, for every match, the set of athletes that can still win it, but stored as a treap keyed by athlete number. At match $$$k$$$ with children sets $$$X$$$ and $$$Y$$$, an athlete $$$x \in X$$$ can win iff $$$x \lt \max(Y) + d$$$ (and symmetrically for $$$Y$$$). So we split off the suffix of $$$X$$$ with keys $$$\ge \max(Y) + d$$$, and the same for $$$Y$$$. Everyone we cut off is eliminated at match $$$k$$$, so their answer is $$$dep_x - dep_k$$$, where $$$dep$$$ is the number of matches above a node. We walk the cut-off treap in $$$O(\text{size})$$$ to record those answers, which is fine as every node is cut at most once. Now the main part. We need to merge what's left of $$$X$$$ and $$$Y$$$, where the naive way is to iterate the smaller one and insert everything one by one. There is an alternative way to do this though, by making an "unordered" merge: the root with the higher priority splits the other treap by its key, and we recursively do an unordered merge on both sides. Why it's $$$O(n \log n)$$$. The $$$a$$$ elements of the smaller set cut the bigger one into at most $$$a+1$$$ runs of sizes $$$g_1, g_2, \dots$$$ with $$$\sum g_i \le b$$$, and the unordered merge pays about $$$\log(g_i + 1)$$$ to skip each run (in expectation for treaps). By concavity of $$$\log$$$ this is maximized when all runs are equal, so a merge of sizes $$$a \le b$$$ costs $$$O(a \log \frac{a+b}{a})$$$. Let's re-charge this cost to the elements of the smaller set instead, or $$$\log \frac{a+b}{a}$$$ each. For a fixed athlete, this can be thought of as $$$\log \frac{\text{new size}}{\text{old size}}$$$ of its own set, so its charges telescope. If its set grows $$$1 \to s_1 \to s_2 \to \dots \to s_m$$$, it pays $$$\log s_m \le \log n$$$ in total. When it's on the larger side, it pays nothing. Summing this across athletes, we get the $$$O(n \log n)$$$. The above is already implementable, but the solution I described also cuts the athletes that can no longer win, so a set can shrink and later grow back, which somewhat breaks the telescoping argument. Think of an athlete's total charge as the total increase of $$$\log(\text{size of its set})$$$: without cuts this is at most $$$\log n$$$, and with cuts we additionally pay at most the total decrease. When we cut $$$k$$$ out of $$$s$$$ elements, each of the $$$s-k$$$ survivors loses $$$\ln \frac{s}{s-k}$$$, which sums to $$$(s-k)\ln\left(1 + \frac{k}{s-k}\right) \le k$$$ using one of our faviorite inequalities $$$\ln(1+t) \le t$$$. So a cut costs at most one unit per removed athlete, and since every athlete is removed once, all cuts add only $$$O(n)$$$. The splits themselves are implemented in $$$O(n \log n)$$$ and the walks over cut-off parts add $$$O(n)$$$, so the total is still $$$O(n \log n)$$$. Implementation is here: 400424364. |
|
+4
larp |
|
+4
I would recommend using usaco guide instead. Both are free and usaco guide is more condensed and from what I’ve seen from youknowguide, following it as a guide rather than a reference takes way too long and will spend a lot of time on algorithms that are either extremely advanced or not very useful (although you will have a very complete toolkit of algorithms at the end). To me it feels more like a Wikipedia where specific things may be useful from time to time but knowing everything within it doesn’t make a ton of sense. |
|
+4
I approve the msg |
|
+3
I loved solving F, very nice problem. Orz sunbrey |
|
+3
the wait is over, mac beta is out now :D |
|
+3
vim mode is in since 1.4.0, its in Settings > Editor :D |
|
+3
My comment might help you understand that. |
|
+1
Here is how you can solve E problem. First observation: Distance travelled by Aubrey is of the form $$$2^0 + 2^1 + 2^2 + ...$$$ until she gets flustered (distracted) by Sunny's compliment and starts again like $$$2^0 + 2^1 + 2^2 + ...$$$ adding up to the previous distances traversed by her. Hence we can say that Aubrey's total distance is of the form $$$\left(\underbrace{11111\ldots}_{\text{few times}}\right)_2+\left(\underbrace{11111\ldots}_{\text{few more times}}\right)_2+\left(\underbrace{11111\ldots}_{\text{few more times}}\right)_2+...$$$ and so on. Also the total number of $$$1$$$'s in this expression is the number of rounds for which they have played. Also the number of terms of the form $$$\left(\underbrace{11111\ldots}_{\text{few times}}\right)_2$$$ is equal to $$$k$$$ because $$$k$$$ is the number of times Sunny can compliment Aubrey to distract her. Second Observation: Now let's fix the number of rounds we are going to have. Let's have $$$mid$$$ number of rounds (Binary search is coming). This simply means that we have $$$mid$$$ number of $$$1$$$'s to use in the expression for Aubrey's distance. And talking about Sunny, he would have travelled a distance equal to $$$mid \times x$$$. Our goal is to minimize the distance distance covered by Aubrey after $$$mid$$$ rounds (because we don't want her to takeover Sunny). It turns out that if we divide the $$$mid$$$ number of $$$1$$$'s we had into $$$k$$$ groups such that each group has almost equal number of $$$1$$$'s, minimum value of Aubrey's distance is achieved in the expression of the first observation. All we need to do is to make sure that this minimum value is less than Sunny's final position, i.e., $$$a+mid \times x$$$. (I have not discussed how to divide evenly the $$$mid$$$ number of $$$1$$$'s into $$$k$$$ groups to achieve minimum distance because I want you to think and spend time on this). Third Observation: This is a simple one. If Aubrey can takeover Sunny after $$$mid$$$ rounds, she can do that after $$$mid+1$$$ rounds also. This means that we can binary search on the number $$$mid$$$. This is my code for your reference: |
|
На
Priyansh31dec →
CP-31 Sheet by TLE Eliminators | Handpicked Problems from 800 to 1900 Rating, 44 часа назад
+1
Yes, I agree, the questions have stayed the same but the ratings are different. That's why I said the current CP-31 sheet is not that helpful, it basically helps you with questions from 500-1500 instead of 800-1900. Why I said TLE staff should take newer contests is because (I checked) all their members have only taken old contests and have stopped, they aren't aware of how problems are recently. While the CP-31 sheet is free, they provide paid courses for competitive programming. All I'm saying is if my educator hasn't taken contests recently, i don't have confidence that they are rated well with today's ratings so I would not spend money buying the course. Priyansh31dec — Last contest August 2022 (Oldest) 431jericho — Last contest April 2024 khnhcodingkarlo — Last contest April 2024 AnikateKoul — Last contest August 2024 ninjacoder2209 — Last contest December 2024 Soumojitkgp — Last contest October 2025 tushar19280 — Last contest January 2026 Iamsadscam01 — Last contest April 2024 Hardikaswal — Last contest Nomber 2026 Leelasai_2004 — Last contest January 2026 CoderAbhi27 — Last contest November 2026 Most of the staff (with an exception of 4) haven't taken recent contests to know what is required to move up in ranking. |
|
+1
it should have been me! not sunny |
|
+1
Which means I can change my username and disguise myself as LGM again:) |
|
+1
Thanks. |
|
+1
Glad you liked it ! |
|
+1
In C its proven that alternating strings are impossible, but why not for all other combinations? This isn't immediately obvious to me because a possible one can still be made impossible |
|
+1
C is easy to be honest... |
|
+1
yeah, i listen rock music while I'm coding :) |
|
+1
first thing i did when it came out https://caterpillow.github.io/byot |
|
+1
Hello, thank you for the interest! Currently, we have no plan on uploading the problemset to Gym. However, we will share all the problem's component in a public github repo (similar to the previous years), and feel free to deploy it on whatever OJ you need! I will inform you whenever it is finished. |
|
+1
No reason not to move it back to Saturday |
|
+1
interesting |
|
+1
Auto comment: topic has been updated by theoneandonlytron (previous revision, new revision, compare). |
|
0
tysm ^.^ |
|
0
When is the editorial arriving? |
|
0
Thank youuu |
|
0
Where is the editorial |
|
0
Auto comment: topic has been updated by Zanite (previous revision, new revision, compare). |
|
0
Go away N1GGA let us sleep peacufully |
|
can u please guide me how to optimally use usaco guide |
|
0
Starts in ~2 hours |
|
0
Syria mentioned. Let's goooo! |
|
0
Can u also archive the whole problemset in the Codeforces Gym too? I'd appreciate it ._. |
|
0
Auto comment: topic has been updated by cumbaackkk (previous revision, new revision, compare). |
|
0
steps to -300 contribution, day 1! DOWNVOTED! |
|
0
mambo like your name. and are you hola_grifin |
|
0
All the problems here: https://qoj.ac/category |
|
0
Starts in 15 minutes |
|
0
...I hope you will very much consider deleting this post (and changing your username later this year) after realizing how much it has contributed to the ratism """problem""". Either that or getting banned, whichever comes first. |
|
0
U can give ur handle to claude then tell it about ur stuck, it will analyze ur work then he will give u a plan. |
|
0
i don’t think 2026 noip T4 falls into this category lol (in terms of implementation difficulty) |
|
0
I wonder how to settle the problem C, and I have asked the AI but I can't understand what it said |
|
0
It seems like all DP is fundamentally just proved by induction. |
|
На
HKUST-PL →
PhD and Postdoctoral Positions in Theoretical Computer Science in Italy, 42 часа назад
0
tbank is right. If you have a non-EU bachelor's degree, the committee decides whether to accept it for admission to PhD. Since your profile says SUST, I should mention that we already have a precedent for Bangladesh. A 4-year Bangladeshi BSc was previously declared sufficient for access to our PhD program. We have also accepted Russian and Pakistani BScs in the past. Usually, for countries without a precedent, if you can do a PhD in your own country without a master's, then GSSI will allow it, too. If not, then the committee has to deliberate further and look deeper into the contents of your degree and courses. |
|
0
When are you going to send the steps to claim prizes? |
|
0
for last point I just changed my used language from python to c++ so thats why I wanted to say about that lol |
|
0
can someone explain me "B" as my way of thinking is that there is only one way Alice wins if there is a x with frequency of x == 2*k-1 other wise BoB wins but this is not working. Can someone tell me what am i missing. |
|
0
its flagging my go template which is a false flag since init() is called by the go runtime automatically |
|
0
Code analysis feature is quite new , I'll look into why default templates get flagged , anyways thanks for feedback. |
|
0
ok but how will be my life after I finish Phd? If I want to pursue TCS rest of my life and also survive on that how does that look like? |
|
0
Why are there no comments? |
|
0
You're welcome |
|
0
For some reason it shows the very first contest I took part in(in which I got no problems right with 3 WAs) as a high probability of cheating.
Could this be because of an overly aggressive bias against new accounts? Anyway, I wish you luck on developing this, hopefully one day it can help solve some problems in codeforces. |
|
0
actually , it is because you are a relatively new account with small amounts of submissions. during the training model found a suspicious amount of people that have a high rating while having little to no ACs(except for contests they participated in). So yes there is a small amount of bias , but this bias came from large amount of suspicious accounts Anyways thanks for feedback |
|
0
I've checked your account , you are pretty legit contestant , and you are way below threshold so there is nothing to worry about , but why do you always start your python code with https://usaco.guide/general/io ? |
|
0
hello |
|
0
one of the best rounds ive had the pleasure of solving! F and H felt soo hard :c |
|
0
I use an online coding site created by a group that creates material for the United States of America Computing Olympiad(USACO) that lets you run stuff like test cases inside the editor, and whenever you open a new program this: is what's open in the editor, so I delete everything except for the top line and write my code. I don't keep the top line for any particular reason, it's just by habit. |
|
0
For the CSES Bracket Sequences II, One could treat them as counting the number of trajectories from the point at which the prefix ends (say) $$$(a,b)$$$ to the pont $$$(n,0)$$$ such that it doesnt cross the x-axis. Now via reflection principle (reflect it along $$$y=-1$$$), it is the same as finding the number of trajectories from $$$(a,b)$$$ to $$$(n,0)$$$ minus the number of trajectories from $$$(a,b-2(b+1)$$$ to $$$(n,0)$$$ So the answer is simply Note $$$n$$$ is even. |
|
0
Oh ok |
|
0
can anyone tell in question E test case a = 5 x = 1 k = 3 how 13 is coming because when i am dry running its comming 11 . I am checking if aubrey is smaller than sunny when aubrey reaches or exceeds sunny i am resetting v to 1 when k is not 0 if k reaches 0 then break |
|
0
Dear Codeforces Support Team, I am writing to sincerely appeal for the unblocking of my account, GoldenFishKnight. I was deeply saddened to find that my account has been disabled. I firmly believe this is a false positive, and I would like to explain the circumstances that might have triggered your security system. After browsing similar cases in the community, I suspect my account was flagged due to the following reasons:
However, I am NOT engaging in multi-accounting or cheating. This is the only account I am currently using. The reason I achieved a high score is that although I stopped playing on Codeforces, I have been training rigorously on other platforms over the past two years. I have attached screenshots of my LeetCode (China site) weekly contest stats as proof. I deeply respect the Codeforces community and the rules of fair competition. I apologize if my negligence regarding the VPN caused any trouble for the administration, and I promise to be extremely careful and ensure my network is clean for all future contests. I kindly request a manual review of my account and my submission history. Thank you for your time and understanding. I look forward to your reply. Best regards, GoldenFishKnight |
|
0
You get 13 instead of 11 because Sunny can give a compliment in a round before Aubrey reaches him, rather than waiting for her to catch up :3 |
|
0
Rule "Only participants who entered a valid ICPC username (email address) during registration are eligible for recognition as a Challenge winner". However, no email address was asked. Is it taken from the codeforces account? |
|
0
Great contest! |
|
0
Thanks ! :3 |
|
0
Sorry if I am necroposting but I just realised today that I have a Propose a contest/problem option! And the number of rated contests I have given so far are 38, so the hypothesis that at least 100 contests are required is not true, at least as of 29-11-2026 |
|
0
How to improve in dp? |
|
0
Can you add link of cf Gym, where we can submit problems there pls |
|
0
Orz, this view of SAM is really helpful. Great post! |
|
Solve so problems and make sure you learn something new every time. I created this website (https://antinloop.com/games) and it has many games to help you understand how an algorithm or a data structure works, try it out. Do not overspend time on it just try to learn something that help you solve a problem, remember your goal here is to enhance your problem solving skills, |
|
0
thankyou |
|
0
I hope this helps you.
|
|
0
Auto comment: topic has been updated by stuwupidwjbu (previous revision, new revision, compare). |
|
0
mac beta is finally out, run brew install gcc first and tell me if anything breaks :D |
|
0
Use next smaller and prev smaller elements concept of monotonic stack. This gives u a boundary. left=i-pse[i]-1 right=nse[i]-i-1 Now total is n(n+1)/2- Summation of (((left+1)*(right+1)-2)) over all i |
|
0
hey the mac version is here now, still beta tho, hope ur CF journey is going well :D |
|
0
Thank you! lemme try it out |
|
0
thanks |
|
0
fixed since 1.5.1, my guess about PATH was wrong, it was the astyle that came with the app. sorry about that |
|
0
this one is fixed since 1.5.1 too, tell me if its still laggy for u |
|
0
cerr has its own Stderr card next to the output now, its a panel and not an error.txt file tho, does that work for u |