+126
|
+79
|
+70
I proved that the required upper bound is $$$O(N / \log N)$$$, but because creating a test case that achieves that upper bound also seemed non-trivial, I didn't seriously consider the constant factor. I ended up submitting with a slightly conservative estimate, taking into account the possibility of tight TL or ML. (Also, since the pretest succeeded with a limit of 1K, I submitted with a limit of 2K.) While it might have been better to have some cases in the pretests closer to optimality, I think it's great that there were test cases in the system tests that required quite large upper bounds. Thanks for preparing a good contest! |
+63
I will elaborate on that. You're right, it wasn't expected and that's mostly my fault -- I was able to come up with $$$O(n^2)$$$ solution pretty easily and thought that a lot of people will think about solution $$$O(n \cdot bound)$$$ after some time. In general, I don't want for last problem to be that hard and I will try to listen to feedback of other people more carefully. I still hope that people had fun thinking about this problem (and others problem of the round). And one more point -- we intentionally didn't put in pretests tests where you need to use very big value of bound (maximum one that zltzlt was able to construct was around 3k and you can pass pretests with around 1k). I also want to elaborate on that. In general, I would vote for pretests to be as strong as possible, but here it was kinda special -- we didn't want people to try to squeeze solutions just with pure guessing (and since I've underestimated the problem, I thought that a lot of people will try to do so), that's why I agreed to not use such tests into pretests. In retrospect, I would insist on putting them (because problem already turned out to be too hard), and I fell sorry for maspy, congratulations on the win though! |
+63
IOI selection has not concluded yet please don’t spread misinformation. |
+50
It wasn't fun at all |
+50
Easy problems in abc are designed to require no algorithm but programming language. AI masters programming languages very well and also know a little about algorithms. It's normal for AI to solve these problems, or AI would be too weak. |
+45
C has a significantly simpler $$$\mathcal O\left(n \log\left(n\right)\right)$$$ solution. Notice that instead of stopping at the LCA, if the path has missing entries, it is valid to continue farther up the tree. The path only has to stop when it runs out of missing entries or it reaches the root. Therefore, assuming at least one entry is not missing, a simple solution is to repeatedly choose the largest entry $$$x$$$ with missing neighbors and replace those missing neighbors with $$$\left\lfloor\frac x2\right\rfloor$$$ (or $$$2$$$ if $$$x = 1$$$). This can be implemented in about 20 lines with a priority queue: Implementation |
+42
Clearly, you are the second type of person. |
+37
I love the $$$O(\frac{n^2}{\ln n})$$$ solution of problem F, however I spent my whole time in $$$O(n\log n)$$$ overcomplicated segment tree merging solution and mixed indices like tr[x<<1](should be tr[tr[x].ls]) then finally finished 10 minutes after the contest... edit: I got the first blood!! so funny XD |
+37
There are 10 types of people: 1. Those who like bit manipulation. 2. Those who don’t like it. |
+37
I hate haters |
+37
I like when FBI tests the round ! I feel more secure |
+36
Stucked on C for $$$45$$$ minutes and finally got 1 place lower than sevlll777, who solved 1 problem less than me. The slowest episode ever. |
+34
May Luogu provide a English site just like atcoder? |
+33
What the fuck of the C??????????? |
+31
Latin America, Argentina, Universidad Tecnológica Nacional — FRSF Fruta Fresca 🍉🍋🍌🍍🍎 |
+31
I feel scared that AI will be stronger than many people. |
+30
problem C has quite a bit heavy implementation. |
+29
Why is today's G only worth 575 points? I think it is as hard as last round's G, which is 650 points. (and the statistics agrees with me too!) |
+28
C's editorial is not friendly as a regular C. LCA is not something that most people thinking about in this position. There's still a solution without using such advanced topic, but why the author didn't do that? |
It's called qq because when you try to register you cry |
+27
clist rating |
+26
to give div2 people a harder problem to upsolve |
+25
It was more like Div. 1.5 |
+25
I don't think ratism really a big thing, I think it's just the massive amount of glazing this community does for CMs, Masters, and Grand Masters. |
+25
Uzbekistan's team:
|
+22
|
+21
Love the first hint of the problem E |
+21
Why i am still blue even my max rating has been changed to candidate master? |
+20
Tough contest. We weren't given enough time. |
+20
Auto comment: topic has been updated by zltzlt (previous revision, new revision, compare). |
+20
when will the rating be updated ? |
+20
Alternative DP solution to F: The problem choose the largest connected set of edges that has exactly $$$k$$$ leaves and contains the root can be solved with DP. Let $$$\mathrm{dp}_{i, j}$$$ be the answer for the subtree rooted at $$$i$$$, when taking exactly $$$j$$$ leaves. The transitions are straightforward — same as in knapsack. This gives us a $$$\mathcal{O}(n^2)$$$ solution. Notice that the sequence $$$(\mathrm{dp}_{i, 0}, \mathrm{dp}_{i, 1}, \dots)$$$ is always concave for a fixed $$$i$$$. This can be easily proven with induction — the sequence in leaves is concave, and the max-plus convolution of two concave sequences is also concave. This gives us a faster solution. Instead of storing the DP directly, store the adjacent differences (they will always be sorted in non-increasing order). Then, we can use small-to-large merging, which gives us $$$\mathcal{O}(n \log^2 n)$$$ complexity. |
+20
I am 25 years old |
+20
MikeMirzayanov please make this place out of such things. |
+19
I'm officially having skill issue with constructive problems (again) :D |
+19
look at the tester predictions, it is hard to be very accurate in predicting difficulties. F isnt very relevant for div2'ers anyways (only about 10 solve an average F?) that numbeer only decreased by 10. |
+19
Good luck to Mongolia's team! |
+19
i dont see why they should remove it either, its not like its disallowed |
+18
Solution : |
+18
My O(max(a) * log(max(a))) submission passes for E, maybe you didn't remove duplicates from the array? |
+17
Vladosiya back to CM |
+17
I think this is not a place to get political. |
+17
One of the ways to fix it is to add the target pragma AFTER the STL includes. This should make your code compile, but a lot of code would simply not be optimized, so use it at your own risk. It is not necessary to leave the whole STL without optimization, you only need the place where the error occurs to be before any this code compiles on g++-13 in custom test |
+16
Look at the standings. It seems your F is too hard for a div2 so it works like a 5-problem round. Is that good? |
+16
It could be that the cheater is actually out to "expose" high-rated users who sell out easily. OP made the right call here. |
Using QQ is a terrible suggestion to someone who doesn't live in PRC and doesn't know Chinese. QQ-international is abandoned by tencent long ago and is not even supported on my device. When I tried to register in Play Store app, I got the following error message: I tried to go here to register on a website, and it told me:
Then I had to download the app from https://im.qq.com/, because of course the version in Play store is outdated. Well, and after jumping all these hoops (and also passing Chinese CAPTCHA) I end up having this: Meaning that they will not let me register with non-Chinese phone number no matter what, because I got the same error message on like 10 different days I tried to register over the last year. If you really want foreigners to get into Chinese IMs, at least suggest WeChat, it's somewhat possible to register and it actually has an English interface... |
+16
It's quite fun seeing I am blue with the rating of 2007 :) but I believe it will update soon. |
+16
well, well.... |
+16
If you seek attention, then twitter is a better place for all these political topics. Leave this platform away from such stuffs. Nothing gonna change by such posts. |
+16
Hi! I'm glad you liked the post and hope you learnt something new from it. On comments |
+15
same |
+15
It might be better to swap the D and E. |
+15
I could not understand your solution very well. It sounds like a great idea. Can you please explain in more detail (possibly with your thinking approach). Thank you |
+15
Someone will never think such complex solution in problem C! I solved C with Two Pointers method, just filling the My solution: 263542553 Time Complexity: Uphacks are welcome! |
+15
Maybe you should ping the author chromate00 to check this. |
+14
BitForces ( |
+14
BitForces |
+14
I have consulted the coordinator for a way to fix this. If I can swap out the model solution to the $$$\mathcal{O}(n {\log_2}^2 n)$$$ tester solution that is guaranteed to work, then at least the problem becomes fine. I am unsure if this is possible however. I will keep you updated. |
+14
Strong! |
+14
Romania:
|
+13
Adhoc dominates codeforces nowadays a lot. |
+13
This is something i have though about it lots of times and i think i have an accurate answer. First of all, let $$$A$$$ being attractive, $$$B$$$ being social and $$$C$$$ going out, partying or any social activity, and $$$D$$$ doing math, CP or any intelectual acitivity. It is pretty obvious that $$$A \implies B$$$, whether we like it or not, people that have A are more accepted by the society and that causes that they talk to more people, make more friends, etc. Im not saying that $$$\neg A \implies \neg B$$$, just saying that A makes it easy to go to B. Also $$$B \implies C$$$ because if you have many fried groups, you will do activities with them probably. Finally $$$B \implies \neg D$$$ most of the times because if you spend your time in social activities you have less time for intelectual activities. So we get that $$$A \implies \neg D$$$ in most of the cases. |
+13
APMO results still aren't out though |
+13
For example, consider the sequence [9, -1, -1, -1, -1, -1, -1, 5]. The solution presented in the editorial is to find the unique simple path from 9 to 5 in the binary tree ([9, 4, 2, 5]) and then alternate between 5 and 10, resulting in the sequence [9, 4, 2, 5, 10, 5, 10, 5]. Most of the complicated logic in the solution is for finding this path, and in particular, for finding 2, the LCA of 9 and 5. My solution is to repeatedly find the largest entry with a missing neighbor and set its missing neighbor(s) to its value divided by two. In this example, 9 is initially the largest such entry, so set its missing neighbor to floor(9/2) = 4. Then, 5 is the largest such entry, so set its missing neighbor to floor(5/2) = 2. If the largest such entry is ever 1, we cannot set its neighbor to floor(1/2) = 0, so set it to 2 instead. Ties are broken arbitrarily. The full sequence of operations in this example is:
For the last sample input, in the first step, 7 is the largest number, so set its missing neighbors to floor(7/2) = 3. Then, there are four 3's, each of which has at least one missing neighbor, so choose one arbitrarily (here I chose the first one). Then, there are two 1's and three 3's with missing neighbors, so chose one of the 3's arbitrarily (here I chose the last one). This case proceeds as follows:
In the binary tree, this corresponds to choosing a path that gets as close to the root as possible and using the cycle 1 2 1 2 ... to fill any remaining space. This can be implemented easily using a priority queue. |
+13
Good job! Trolling cheaters is funny :) |
+13
Yeah. That is the point of ratism |
+13
cringe ahh post |
+13
|
+13
In Div. 3 the most important thing is the number of solved problems. If 2 participants have the same number of problems solved, then a "penalty" is computed for each of them. The penalty is the sum over the solved problems of the number of minutes from the begining of the contest up to the accepted submission (I think that if you send 2 or more accepted submissions then the last one is the penalty giving one). Penalty can also be accumulated by making wrong submissions, i. e. 10 minutes/penalty points per submission. Thus if you submit 3 wrong submissions and a correct one after 50 minutes from the start of the contest, your penalty will be $$$3 * 10 + 50 = 80$$$ for this problem. Do this calculation for each problem, sum the penalty and you get your total penalty. It is best to have small penalty (i. e. solve problems fast with less errors). |
+12
very correct |
+12
For problem $$$C$$$, i found this logic. In order to go from one positive value to next positive value, we find the minimum no. of operations required, then if the required operations is less than given steps and has same parity as required, it is possible to go from one value to next, otherwise just return -1. This we do for all such positive values. Then, for first and last element, we just fill remaining -1s by doing *2, /2 and so on. |
+12
It's actually confirmed that they used AI, because if you see their submissions such as https://atcoder.jp/contests/abc355/submissions/54073783 and https://atcoder.jp/contests/abc355/submissions/54073778, it says "Generated by gpt4-o" at the top. |
On
X.MAN →
My cpp code runs on my machine very well but gets Runtime error on codeforces., 13 hours ago
+12
Some local environments, like CodeBlocks, tend to mostly give your program zero-filled memory on allocation. So the bugs like uninitialized variables are less visible then. |
+11
It seems that all the people participating in this round but not the next round and getting level upgrade have encountered this problem. |
+11
I only hate them who don't hate themselves. Spoiler |
+11
O(n) problem D in only 24 lines UPD: I compressed my code further and I'm surprised to find that I now have the shortest correct solution for the problem. |
+11
it's the penalty for a wrong submission in this round |
+11
You can solve all problems here: https://oj.uz/problems/source/652 |
+11
Did he do it on purpose? I asked because...... |
+11
Actually, every submission after the first accepted one does not count, so the penalty is (the number of wrong submissions before the first accepted submission) * 10 + (the time in minute the first accepted submission was made). This is why you can freely submit multiple solutions if you have any doubt in your previous accepted solution without worrying about the penalty in Educational / Div. 3&4 rounds (as opposed to normal Div. 1 or 2 rounds where the earlier solutions become WA penalty). |
+11
Thanks for reply! |
+11
I will use the power of induction, going over the number of vertices in the tree. The base is immediately obvious for Consider a vertex Actually, This means we can choose some leaf nodes outside of Suppose we have some solution which is not greedy. Let's show that there is a vertex P.S. May be there is some inaccuracy in my proof, such as |
+10
C is not a C. D is not a D. I think CDEF should be DEFG, and insert an easier C. |
+10
Firstly, that wouldn't be helping anyone. I shouldn't even need to add to that, but I will. I am simply against it, as I said in my blog, you are only fooling yourself. And obviously, I do not want to be associated with such a thing. I am a CP enjoyer, CF Master, IOI medalist, problem setter myself, and probably a member of the Serbian committee from next year. I am not going to give all of that up over some small amount of money. Even when I help people with upsolving problems, I also do not like to give solutions. I prefer to give just hints, as most fun comes from figuring out the problem and enjoying the process of going from reading to AC. Without it, AC doesn't feel special. |
+10
I was expecting a problem to minimize the error, but it turned out to be a problem to cancel the error knowing the accurate answer. Still a fun problem, but it seems not as useful in practice as advertised (they said "addressing this challenge", not "a problem inspired by this challenge"). It would be surprising to me if the organizer could use any of the algorithms in this contest on their chips. |
+10
:)) In our country the children day it's June 1 |
+10
maybe its all to get more contributions |
+10
Wow it is less than 24 hours?!? Please come join the contest. Fun guaranteed! |
+10
GLHF! |
+9
This didn't seem like a Div. 2. |
+9
Any smart solution for C? Feels like another boring implementation task that I can't care less debugging. Took a huge L today. |
+9
Will the rating changes of this round be calculated on the ratings before the EDU or on the updated ratings of the EDU? |
+9
Same |
+9
Wait. maspy FSTed on problem F??? A 0-solve D2F?? |
+9
I think people cheat so that they can show it in their resume that they have such and such rating and title on codeforces. But even that is not very effective as truth will be out when the company interviews you on your coding skills. |