✨ It took over a year, but it's finally here! ✨
Hello everyone! :D
We are proud to invite you to participate in Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2), which will be held on Apr/19/2025 17:35 (Moscow time).
The round will be rated for everyone. You will be given 8 problems and 2 hours to solve them. One of the problems will be interactive, so make sure to read the guide for interactive problems before the contest.
All problems were authored by thenymphsofdelphi and me.
We would like to thank the following people:
- 244mhq, for coordinating the round;
- 7oSkaaa, ItsNotMeItsYou, Error_Yuan, Hori, larush, N_z__, omeganot, RobeZH, Um_nik, user202729, VHPro, zltzlt, for testing;
- MikeMirzayanov, for creating Codeforces and Polygon;
- Last but not least, you, for participating!
Scoring distribution:
| A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|
| $$$500$$$ | $$$750$$$ | $$$1500$$$ | $$$1750$$$ | $$$2000$$$ | $$$2750$$$ | $$$2750$$$ | $$$3500$$$ |
See you soon, and we hope you find the contest ✨ wonderful! ✨
And now, a word from our sponsor!

Neowise Labs is a proprietary trading firm founded by dark_ai, Igor_Kudryashov and Edvard. Most team members in Neowise Labs have maths and programming olympiad backgrounds. You can read more about us in the recent Codeforces post.
We’re open to find and work with new team members from the Codeforces community. If you’re interested in research, infra or other positions please fill out the form.
We’ve prepared presents for the winners and participants of the round:
- The best three participants will receive Apple Macbook Air M4 13'.
- The top 50 and random 50 participants from the top 500 will receive Neowise Labs caps.
- We also prepared valuable presents for some of the top 500 contestants but the formula to choose those contestants is a secret and will be revealed after the contest is finished, sha512 checksum for the formula is below: 7b55c594304f082436ee82bc051cf209254c103ef4545a4045c61e5d8340426a8124d8e5b5f1e1da8e534e72c4336255bd0443e5a47e35c03c6dd55ae5cbc1cc
Best of luck on the contest and have fun!
Update 1: The scoring distribution has been announced!
Update 2: Seems like a notorious coincidence.
Update 3: The editorial has been released.
Congratulations to our winners!








As the emotional supporter for SanguineChameleon, I hope everybody will enjoy the problems!
As a tester, I enjoyed the problems a lot and encourage everyone to join the contest
Hope everyone to get a plus in rate
As a tester, I can confirm that the problems are extremely interesting! 🔥
Being a Participant I want to announce that, In Pakistan this contest is more than a Div. 1 + 2 contest. It is POI (Pakistan Olympiad in Informatics). I hope for 1200+. Can someone give any suggestions to reach 1200 +.
We're u also told just one day before the test ? How it was fair from Pakistan's side? Thanks
That's unfair for us, I was really expecting that this contest will be offline, but we can't do anything about this.And how about your standings.
I tried to solve the first problem which was easy a according to them but didn't submit it due to not having proper output. We were only give a day for this competition how we could stand good?It was our poi and authorities of Pakistan should give hint about it. The problems were good however.What about ur Standings ?
so beautiful dp.
As a tester, this is my third as-a-tester comment. :)
I enjoyed the problems, and I encourage everyone to participate in this round!
hope to reach 1700+)
But I have a question: Is two hours too short for a Div1+2 contest? From your perspective as a tester, do you think this duration is appropriate?
Thank you to the authors for setting the problems. Once again, I enjoyed watching Hori suffer.
As a tester I enjoyed suffering (and the problems of course). I encourage everyone to participate.
As a tester, I hope you enjoy the problems, as well as wish you luck to win some presents )
as a current hsgs student, I am actually obligated to participate in the contest (not really)
"Over a year in the making? These problems better be ✨ legendary! ✨ Can't wait!"
hope to reach Specialist
You'll need at least GM perf to do that
yayy, contest with vietnamese problemsetters
i hope the problems are strong strong :)
Hope to get back in Cyan
As a participant, seeing Um_nik as a tester means more binary search problems.
As another participant, testers have no role in setting the problems.
You can not ask about the problems before the contest lol
I'm not asking about problems, but rather telling.
Cool spoiler lol
After the contest, I can conclude that you're an Um_nik agent!!!
He is very hot, and he knew it
As another participant, seeing Um_nik as a tester means no useless algorithms.
Hope to reach 1400+
Hope to reach 1600+
I can't make it. Only 4 need to be experts. I'm holding in 1596; hope for the next.
Same actually I only need 5.Maybe we can become expert after plag check
Are you sure there is still a chance for a plagiarism check?
yeah for example my rating was 1403 before plag check but after the check it increased and become 1405 still there is a 2 rounds that will have plag check
okay lets see, what happend
hope to reach CM
oh wow, so close, best wishes. lezzgo!!
Vietnamese assemble!
RAHHHH
Oh wow, there are presents as well. We need strong luck to score one of the random lottery prizes.
As a participant, I hope I can reach GM.
interesting!
orz Um_nik
Good luck to everyone!!! And enjoyment of doing contest to everyone!!!
Hope we will enjoy the contest !!
Isn't Div. 1 + Div. 2 usually 2.5-3 hours, Why only 2 hours this time?
UPD: Oh I realized the pattern, 9-11 problems -> 2.5-3 hours. 8 problems -> 2-2.5 hours.
When will the scoring distribution be released? The contest starts in about 1 day and I don't know what problems I should be focusing on
dm contest vn
As a participant, I can say that this is a contest.
An interesting pattern has caught my attention! Even wondered, why there is an _ in Um_nik handle? Well, every small detail has a reason behind it! Let's look at letter positions in the alphabet:
U -> 21 M -> 13 N -> 14 I -> 9 K -> 11
See it yet? 21 + 13 + 14 + 9 + 11 = 68
And Umnik1 doesn't look pretty
Dear Um_nik I would like you to either confirm or deny the aforementioned reasoning
It's based on the fact that Um_nik means (something like) "a smart aleck" in Russian.
won't get c for sure as it's gonna be rated more than 1500. no negative please- i wanna push to cyan
Scoring doesn't relate to the rating of the problem
Not one, not two, three Macbooks Neowise labs printing some money
SHA‑512 is a one-way cryptographic function. I hope the questions are in the field of cryptography and we all have fun.
i wish interactive problem is not beyond d
Um_nik is a tester means it will be worth it!!
hope to reach cyan this time
also this contest is so orz
Can anyone please tell me how the score distribution is related to the problem rating? 500 means 800 rating problems on Codeforces?
No, it's not like that. The problem rating will be updated on the problem tag after around a week. This is just a score used to prepare the scoreboard and has nothing to do with the problem rating.
Thank You So Much! Now it's make sense to me
Hope to reach 1200+ rating
You need to give alleast expert like perf for that
Proud that the contest was prepared by 2 Gold IOI Vietnamese ヾ( ˃ᴗ˂ )◞ :DD!!!!
Authors got so much aura that they had to make a contest on codeforces
participant, +ve!
back after 6 months
The language of problem is really bad, it took me so long to understand what it is actually asking. Very ambiguous problem statement
I understand your pain, bro.
same
amazed by how many people solved b, is it that easy?
ikr, how did so many people solve b esp that fast
it looked hard because of how confusing it was at first, but when you understand it it's pretty easy
For today, I'll just accept my fate as the proud owner of sticks & gloves. Thanks for the contest!
BRUHH I GOT -VE
nice try diddy!!
C was amazing and hard :)
was that of dp?
I'd rather be a proud leader of a city in Ancient Berland than to be a proud owner of lightbulbs.
Fun Problems, C was much harder than usual. D was lights out
How did you do it? I tried everything using two-coloring and still WA on test 2...
Take/Not take DP.
The insight is this: pre-compute whether you're forced to take for each row and column separately
For example:
ex1: [0, 0, 0] if index 0 takes, you have [1, 0, 0], index 1 is forced to not take.
ex2: [-1, 0, 0] if index 0 takes, you have [0, 0, 0] index 1 is forced TO take.
expand this out to 2d by keeping track of for each index whether you're forced to take or not, and if you're both forced to take and forced not to take it's impossible.
Next step is running a dp over column cost, and dp over row cost. Keep in mind altering columns/rows do not affect each other so can be calculated separately
.
so you are not leaving CF now??
Yeah initially thought H was some kind of gpt-able problem, but it was copy pasted.
it's time to learn japanese :(
H
C is way above my level but i gave it a try
im thinking of constructing two more diff grids, one for row differences and one for column
then to apply the summing operations in these
if a row in the col diff array / col in the row diff array have all 1, 0, -1 — then the grid is impossible
then there are different cases
am i even remotely in the right direction? please guide
For C i ran a take/not take DP for both rows and columns separately.
The next insight is you need to pre-compute whether you're forced to take or not take based on the previous row or column taking. If you're both forced to take and not take, it's impossible. Otherwise calculate the minimum.
Yes you were in exactly correct direction. you had to prercheck that is some diff is possible for some row, then use dp to find minimum cost for that row. you can repeat that for the columns ( as columns costs are independent of row costs ).
will it be unrated?
Why?
When I searched for "Interval XOR" on Google, this Yukicoder problem appeared at the top of the results. I'm curious whether this is something that only happens within Japan, or if people around the world can reach this problem the same way.
I think only Japan, it didn't work for me
Doesn't appear for me (in US) when I saw H solve count so high I knew it had to have been a copy of a problem from somewhere too bad I didn't see it before :(
apparently it doesn't work for me
It also doesn't work for me, I wasn't able to google this problem without mentioning yukicoder :( I guess it's time to learn Japanese.
i
I found '<' and '>' in problem A is kind of anti-intuitive...
how to calculate y coordinate in D!!! for more than 1 hour, i could not come up with the solution.
Parity of x=c and x+y=c wouldn't change.
would you please elaborate?
We can only xor bulbs in this pattern:
If all bulbs are off initially, on the line $$$x=c_1$$$ (where $$$c_1$$$ is a constant), there will only be an even number of bulbs on. For the same reason, on the line $$$x+y=c_2$$$ (where $$$c_2$$$ is a constant), there will only be an even number of bulbs on.
Therefore, we only need to find the $$$c_1$$$ and $$$c_2$$$, satisfying the number of bulbs on is odd. Solve the equation set {$$$x=c_1$$$, $$$x+y=c_2$$$} will get the coordinate.
Why do you consider parity, and how do you prove that it is a sufficient condition?
I just drew the pattern and stared at it for a while... and then noticed $$$x=c_1$$$'s parity. Stuck for a while on how to find $$$y$$$, looked diagonally and found $$$x+y=c_2$$$'s parity. Didn't prove during the contest, but I submitted because I didn't have enough time left.
As for the proof, I thought for a while but couldn't write it as a formal mathematical proof. Maybe my explanation above could be a proof?
Lol your comment made me realize I was imagining the pattern wrongly — I was taking it as:
Is this also solvable?
It was a pity...
It might be solvable by simulation. I couldn't think out a better one for now.
Thank you, i feel like a fool.
Refer to my code 316287361. Hopefully it will pass system tests.
If you convert x'=x, y'=y+x, the operation becomes a 2x2 inversion. This operation does not change the values of XOR(x') and XOR(y'). If you perform the same transformation on the given coordinates, the answer is X'_ans = XOR(x'), Y'_ans=XOR(y'). If you perform the inverse transformation from here, you will get the answer. Which is x = X'_ans, y = Y'_ans-X'_ans
aaaahhh !! took too much time on C and didn't do D ...
hello div2 my old friend ;-;
well, atleast you could do C ...., i gave up on debugging it after getting frustated XD
ha ha luckily my silly approach for C first failed on given test cases so I was able to submit a better solution
Problem H is same as Interval XOR.
I found it in the last two minutes, just change the input and output. But failed on submitting. Curious with if this contest would be unrated.
As someone who didn't solve H, any hope of removing H from the round and keeping it rated? :P
I feel like it doesn't make sense to have this problem affect the standings if solving it was just a function of whether you copy-pasted an AC submission from yukicoder or not.
I don't know if simply deleting this problem works, because after I solve E, I saw some of my friends solved H, so I spent the rest of the contest doing H. Though I might not be able to solve FG either after all, I think there are definitely many people who were affected by the number of solves and wasted lots of time on H.
Sure, but it's not like
would be fairer for you than
since your rank could only get better after the removal.
this is not the first time this has happened, and certainly wont be the last time.
I think its quite hypocritical statement from you, considering you have also (ab)used this before 187332214 (and so have most other top users before)
Problem coincidences happen, and they are unfortunate but mostly unavoidable. I dont think unrating every round where anybody got an advantage is either possible or good for the community.
Very often problems are very similiar to another problem, instead of being direct copies. What exactly changes there? They still give huge advantage to people who have solved it before.
I think this case is a bit different in sense that (almost) everyone copied this one from the same source.
I did not suggest making the round unrated.
not different to you personally.
In that case, you gained rating because you had seen a problem before. In this case, you lost rating because you had not seen a problem before.
Perfectly balanced.
anyways, lets talk about that case. At least you, umnik and tourist were aware of the existing problem (and probably more but i cannot verify). Even if we are generous, and say only 5 users solved it "illegitimately", why exactly is it a different case? Those 5 users have still "eaten" the other participants ratings.
How does the (copied from the) "same source" matter? What difference does it make if there are 5 sources or just 1
I think maybe half in that case versus (100-eps)% in this case is a difference that matters.
Well, if G had not been counted in that round I wouldn't have complained.
If there are many sources that means that the idea is pretty well-known. For example, in the case of the Good Bye round, I have definitely seen (and implemented) the idea multiple times before, the submission that I copied just happened to be the last place where I saw the idea used.
Whereas in this case I think the vast majority of contestants hadn't solved the problem before, they just managed to search for the problem (with various degrees of success depending on their region).
Adding on to this, maybe a reasonable solution is to remove H, then allow anyone who solved H to remove themselves from rating changes?
Was B very intuitive to you guys?
Took me a while before I had an idea...
I took a little longer too, but because my logic was failing in the given test cases, I was able to debug it faster by analyzing what is happening in the test case LOL
It was not atleast to me, I struggled quite lot to understand last testcase
I've seen similar problems to problem H before (they are private problems, and I've never written codes). I tried to search for it after I saw someone passed it in 9 minutes, and found the original problem in no more than 30 seconds (literally, 30 seconds)
I personally think this problem is well known (although yukicoder is not quite known, but the similar method has appeared multiple times), and I wonder if the testers have really never seen them before, or if the problem setting process is incomplete.
how I found H:
Wow, you solved it like April Fool problems ..
legendary Grandmaster — NO NO NO legendary Detective — YES YES YES.
We got sherlock holmes out here
Anyone else skip C to gamble at D and stuck till the end of contest?
Could anyone tell me the solution of problem E? I can't solve it :(
From examples like this one 'PBPPB' we get that Pairs i,i+1 where s[i]==s[i+1] are irrelevant so we just move them straight away to begin or end, then we get more pairs like that and move them again until we get a string of alternating characters.
Now for this string we just choose 'PBPB' part make it 'BBPP' with 2 operations and move 'PP' to the end again until the string becomes empty.
Thank you very much 111
speedforces :/
What is the test 2 in C?
https://mirror.codeforces.com/contest/2096/submission/316287266
what's wrong in my code?
So interesting especially div2d, enjoying new switch puzzle:)
Please tell logic to solve it.
I could figure out the simulation but it wont run fast .. but I couldn't optimize in time. should be some pattern.
parity of column(number of points with same x) remains even except when x==treasure_x Similarly parity of x+y==c remains even except when treasure lies on it.
this is brilliant, I see it now how it relates to the shape of switch ...
I figured parity of X thing. but didn't observe parity of X+Y ....
thank you for sharing this genius insight.
Why did you consider parity, and how do you prove that it is a sufficient condition?
I was just trying different ideas, there can be exactly one such point so it's sufficient
It took over a year, but it's finally here!
You guys couldn't make an original H in one year?
+1
+1
Bro @2740, how did you manage to solve problem A,B,C within 2 min??
Because he cheated, have a look at his submission tab. Have a look at his submission across different contest, filled with well structured comments and miles long variable name.
He might have submitted the problems all in one go
Bro look at his submission in previous contests as well, he clearly cheated.
LoL, his rating also got increased and he is close to become expert.
How to solve C? Just had an idea that it is DP, but no idea how to approach.
rows and columns were independent and both have exactly same solutions
the dp state I used was
current_row, isEqual, isLessisEqualmeans there is some equal height in the previous row -> this will mean we HAVE to do an operation in this rowisLessmeans there is some height in this row which is 1 less than the last row.. so now I CAN NOT do the increase operation because then this height will become same as previous.so based on these state I choose between doing the opearation and not doing the operation at every row
same thing for column so I transpose my matrix and ran the row algorithm again.. it passed pretests
how are we assuring that some change that i am doing in a row
won't affect the columns order or vice versa
let say we do an operation in a row and now the all columns will have different number
so future calculation will be dependent
as per the code you are handling rows and columns differently
yeah row operations will not affect columns that is the observation I was able to make
if you do operation on 2nd row it becomes
when you do column operation ... (d+1) and (e+1) will be compared ... and
(e+1) - (d+1) == e - d.. so column difference is not affectedyes all column value in that row changes but we are only worried about difference
okay got it thanks a lot mate
np, editorial is also out, hope it clarifies your doubts better
what I did was either do operation on row or skip it , then similarly another memoization for doing operation on col or skip it ans is rowrec + colrec (just make sure you are not doing anything invalid)
how did you check invalid... in my first attempt I forgot to consider that you might actually make equal to last row.. luckily it failed on the given test cases.
if my funtion cant find any valid transition to move forward it will return INF; if it returns INF means its invalid like i will do operation now and move forward to next row but then compare if it finds prev row == current row its invalid
ok, thank you
Scoring distribution and contest time ruined everything, downvote from all my heart.
Just a little fix for being toxic : Problemset was nice, I have nothing against the problemset
How should I deal with this question F? I got stuck for a long time on the pretest 9 due to Time limit exceeded error. :)
Geez.How to D? I literally stared at the coordinate for ages and discovered nothing qwq. BTW. The problems are quite interesting!
this is a very nice observation
https://mirror.codeforces.com/blog/entry/141935?#comment-1267245
thx.
I have seen H before in a private contest, and even taught someone how to solve it a few days ago. Unfortunately, I don't have access to the code for that problem :clown
Apparently its from yukicoder, with input output diff but logic of solving is same
GIGI MENTIONED!!!!!
found my brethren
Did anyone solve F using Mo's algorithm with rollbacks + segment tree? I think I have such a solution but I didn't manage to implement it during the round.
I have the exactly same thought during the contest, and obviously I can't implement the thing either.
As a 2nd year cse student, I enjoyed the contest and learn many things
that is awesome, keep it up
when tourist was taking a lot of time in solving problem H than others i knew something was really fishy about H and yep it was just a copied problem :) else tourist would have gotten rank 1 again
Personally speaking I think simply delete problem H will be a good choice. I doubt if there's one single person really solved the problem independently during the round.
wouldn't that be unfair to some people who spent the round (seeing the first AC at just 9 minutes and thinking there's an easy way somehow) trying to solve it?
Since almost all the people who solved this problem in the early stage were Japanese, I think most people can guess there's an existed problem.
agree I think this question is quite interesting, but I failed to solve it.
will it be unrated?
I think the quality of problem is lower than average Div1, even not taking account that H is an existed problem.
AB is ok, but at least CDE, almost zero thinking and I feel just asked "do you know this?" for every task.
I dislike DE (D probably shouldn't exist at all), but for some reason, those sorts of problems have been a staple in many recent CF rounds.
F was really nice. I think it's pretty hard to get in the right direction, but after finding the right direction, the problem becomes simple (according to the scoreboard, I think I wasn't the only one struggling).
I really shouldn't tried to solve H seriously, I only saw the count on the scoreboard and didn't realize that most submission came from Japan. But this is obviously a skill issue from my side.
I share exactly the opposite opinion of you.
I really like D (E idk, my solution is weird) and really really dislike F due to the implementation and debugging in a 2 hr round. The problem is very standard assuming you have some ds background and I had mindsolve in 10mins of reading it. For proof you can consider my first submit time difference from E submit time, only minor changes for AC (i mean in itself the implementation is not too bad, but the 2 hr is pretty short)
Finally found someone with same opinion on F. Though I didn't solve it during the contest because I suck at coding, I thought of the solution while reading the statement.
I won't hate a problem just because I choked on implementation, but I guess it's each to their own. For the very standard thing, I don't think the scoreboard proves your argument very well, especially because F is not hard to implement.
On the other hand, I don't have a math background, but have seen problems like D countless times. This is yet another problem that is easy if you know its dumb, and you just try some cliche-ish solution to solve it.
I dislike it because (IMO) the impl to thinking ratio is large.
Even if i had first try AC, i would think the same (i was already thinking it when i mindsolved it)
what do you "need to know" for DE? Even C i think is fair.
Do you count invariants as knowledge now?
I think invariants which can recall in a few second is knowledge.
Solvable just only recalling past problems are buzzer quiz rather than problemsolving.
C Debugging forces (Wrote about 100 lines for the solve function and spent the rest of contest debugging)
This was just depressing...
Real
How to solve B? What was the idea?
To find the min you must take, you want to consider the worst possible case: taking the max between l[i] and r[i] for each i. Then, you take the next glove, giving you a pair for sure. The worst case further goes as: you keep taking from those colors that have the most remaining, and you do this for the greatest k-1 of them. Then you add 1 more for the final pair.
isint the worst case like : you pull out all shoes which are maximum in number, then those which are 2nd maximum in number... so on?
in which case the input:
5 297 59 50 87 3695 77 33 13 74should give 489 instead of 481??
I see that you're trying to get 97, 95 (already 1 color), 87, 77, 74 then 59. However, obtaining a pair of the last color only requires 1 more pick, so following your line of thinking after 74 you only need 1. But that's not the worst case.
The worst case is 97, 77, 50, 87, 74 (all colors but no pair until this point). Only after we've picked one side of all colors can we now be sure we'd start forming pairs. Then, 95 (pair in 1 color), and 1 (pair in 2 colors).
(You could also see the flaw in your "worst case" by considering that we only need a pair of 1 color instead. Then you would only pick 97, and 1 (from 95), which is clearly incorrect as it's unlikely we'd pick the correct color from 1 pick among all the remaining socks).
nvm that was dumb
kind of greedy(my solution). consider the worst scenario, where you get all the gloves in k-1 colors, and get either all the left/right gloves of each remaining color. The answer would be something like $$$\sum_{i=1}^k (l_i+r_i)+\sum_{i=k+1}^n \max(l_i,r_i)+1$$$ The "+1" is to gurantee that even for such worst case, there would still be k pairs of gloves in distinct colors. To maximize the answer mentioned above, just sort the colors, redefining the comparing logic.
like this.
can anyone explain the intution of c please
see if this helps
https://mirror.codeforces.com/blog/entry/141935?#comment-1267231
Nice Complement for this contest. But this is very boring work
I had really strong well-known(-in-Japan) vibes from problem H, tried to Ctrl+F on the kenkoooo's website by keyword "XOR", didn't find anything and went to think about F. Although I think I had something on H closer to the end, but not sure yet how far it is from the complete solution
should've tried on yukicoder
Maybe the testers also don’t know about it.
I think I have proof (?) that testers do know about similar problems.
Really? Could you please provide more details?
As a tester, 0 people solved H in testing ...
can someone please check my submission, and tell why its giving tle.
https://mirror.codeforces.com/contest/2096/submission/316268506
PS. its java.
can you try one thing please
int[] ys=new int[n];. can you change it toIntegerarray and try to submit it againintis different fromIntegerandintone is possible to TLE because there are certain cases where it becomes O(n*n)I think your sort might be failing .. you can google hacking Java sort on codeforces
for Integer one tle on 5.
this feels so unfair,tried with pq as well.
tried asking the question to authors . well they say my codes the problem.
Your solution actually passed with faster input/output: https://mirror.codeforces.com/contest/2096/submission/316293259 In the future just be aware that Arrays.sort is O(n^2). Instead, you can use Collections.sort with ArrayLists. Also, find faster input/output. I used BufferedReader and PrintWriter but if you like using Scanner you can probably copy someone else's template for a faster version of Scanner.
thnx bro. thanks a lot for claryfying.
i missed specialist by 9 points bcoz of this earlier. and now this.
thnx for checking. Hope the authors would keep a little bit flexible time limit next time.
yeah passing with faster input
https://mirror.codeforces.com/contest/2096/submission/316295551
thnx a lot sir. hope u get + delta
can you tell why this happened? like it does not happen a lot (ig its happend with me twice).
oh I am sorry for lacking in depth knowledge. but I actually started my CP journey in Java and I just know some of these quirks
but you can read some ideas about Scanner here
https://stackoverflow.com/questions/21797573/why-is-scanner-slower-than-bufferedreader-when-reading-from-input
Same thing. I had to switch to Python :)
You are anti-arbitrashnik -1000 aura disbalanced problems
E is cool. F is very interesting, but couldn't solve
Unfortunately, the problem H coincided with an existing problem on another online judge. While this is a kind of situation we strive to avoid, and we do check that the problems couldn't be found on the internet, there's never a guarantee that we can find all similar problems, especially with statements available in other languages only.
We understand that this is not the best competitive experience for many, and therefore we apologize for this coincidence. That being said, I want to reassure you that such rare coincidences are not a valid reason to cancel the round. Therefore, answering some questions in the comments, the round stays rated.
Did you really check?
Update: this comment was inappropriate and sharp, I apologize for this.
I tried to find problem H on Google during the contest but I didn't find anything. I guess that the search results also depend on your country (e.g., if you are from Japan, you get that problem as one of the first results).
I'm wondering if anyone outside Japan managed to find that problem without searching specifically on Yukicoder (in that case, I have skill issue).
After noticing most people solved the problems in the very beginning of the contest were Japanese, considering Japanese style resources might be natural? But my first action was to check yosupo OJ for new templates…
I managed to find it by searching specifically on yukicoder, after failing to find it by other means.
I was switching between searching on google / various online sites and trying to solve the problem, eventually I managed to find it by searching for yukicoder specifically and landing on this page which happened to have this XOR problem.
Let me be more clear on that instead of just randomly ranting: I appreciate the authors' effort to create a contest and present it to us. Making the round unrated does not refrain us from enjoying the problems, but maintains the fairness of CodeForces Rounds. It's not a participant's fault to attend a contest and lose rating due to this kind of mistakes, make the contest unrated, and we can still upsolve in the problemset.
(Specifically in this case, I'm aware that one of the testers know about similar problems. UPD: I know no one solved H in testing but that's not a contradiction)
It looks like it's me.
I'm sorry but I completely forgot this problem when I saw it in Apr 8 since I tested in Feb 6 :(
someone brought Mike's Blog up again. what he stated were clearly right: we should not blame the authors for such a coincidence, but the ones who commented in the round's blog saying "here are the links"
this time, no one sent links in the comment sections, participants obeyed the rules, but some lost rating because others passed H. finding who is to blame is not the exact same thing as finding a solution to this incident, nobody made this happen on purpose, but who covers up the consequences it caused?
can you provide real evidence for the above (not that they have solved a similiar problem, but that they actually found the coincidences)? Making such big claims about a tester not doing his work without backing it up is a terrible injustice.
He explained in the comments above, and it seems like he just forgot that he had tested it before.
Timeline: 1. he tested, 2. two months later someone asked him how to solve a problem quite similar to this one, and he replied "I've seen a similar problem before, but I didn't solve it or upsolve it."
It's not particularly his fault in this case (he's done a bunch of testings over this 2-month period and it's normal to forget a problem having 0 submissions in test contest), but it's just an evidence to show that this problem seems a bit standard and this incident could've been avoided if not for that many coincidences.
It might be helpful when people prepare or test problems? They can refer to more than 100 resources automatically.
and here I was thinking I got plot armour, round becoming unrated when I have a bad contest XD
ha ha .. can relate.
Yet you'll find numerous ac codes are quite similar to public solutions on yukicoder. Are these entitled to positive delta?
Feel sad for tourist
Is it searchforces?or YuKicodeforces?even googleforces?
Oh,it's originforces. I should search for solution before solving it myself next time.
I think H is a good problem only when this question has not appeared before!!!
I wish it unrated because I got bad rk (。•ˇ‸ˇ•。).
Problem A was harder than expected. Problem B was nice and challenging. Problem C was difficult but extremely amazing and looks completely authentic to me. Unfortunately, I didn't have the time to read more problems. Nice contest!
btw why no hacks on D
It's hard to check whether a set of points can be achieved through that operation. You can only check what the answer must be, under the condition that there exists an answer.
Got it thanks
The hack format could've been to print the starting point and operations, but it's tedious.
Not all valid constructions within constraints can be constructed with operations that reads in 1 second
Moral of the contest : make sure to search every problem on google, maybe you will find the exact same problem XD
Just by reading the statement, how could one not tell problem H must have appeared elsewhere before? Also, one can immediately tell that it must be well known in Japan since most people who solved it are Japanese. What struck me is that this guy ITIS_DuyAnh managed to solve all the way up to problem F solely using LLMs. It amazes me how strong LLMs have become. Considering that only around 30 participants solved F, it 's only a matter of time until LLMs destroys everyone but LGM's
How do you know it's AI?
By reading his submissions. To be honest, it's fairly easy to catch cheaters these days. Just scroll through the leaderboard, examine accounts with low ratings (<1900-ish) but unusually good performance, and click on their profile. If they have made extreme progress in just a few months, it's highly likely they cheated.
Yeah, defintely. Just ban him.
Not that I have any stake in this fight, but I think it's extremely unfair to contestants affected by the duplicated problem H to leave the round rated. I made my case for this position several years ago here and I don't have too much more to add, but it seems fundamentally unfair/contrary to the spirit of competitive programming to decide make rating a function of "who recognizes this preexisting problem", especially when that problem is much better-known/easier to find for people in certain regions of the world.
(I will say that because many contestants spent time attempting H/possibly genuinely solving the problem, I think "remove H, leave the round rated" is worse than unrating the round and probably also worse than leaving the round rated as is.)
I'm a bit confused as to why you think "remove H, leave the round rated" is "probably worse" than both the other possibilities.
I think the only contestants for which this possibility is the worst is those who spent time on H without accessing the Yukicoder submissions and eventually solved it. Which I don't think applies to anyone currently in the top 20 anyway.
(Update) If you solved H by copying, then having the option to unrate the contest for you seems fair:
I think "remove H, leave the round rated" is unfair to people who spent any time on the problem, either attempting to solve it or looking for the problem online (whether or not they succeeded). If H was removed but the round was rated, these people would be disadvantaged vs people who worked only on A-G because they would have effectively had less time to spend on the problems that were not removed from the set.
More concretely, I think rounds should be unrated when there is an unusual problem with the round that made the rankings unfair to a meaningful number of contestants. Under this framework, the round should be unrated rather than rated with only A-G because rating the round with A-G disadvantages contestants who spent time on H relative to those who didn't.
I think rating the round without H is worse than rating the round with all problems because it punishes people who successfully searched for the problem when they violated no rule/code of sportsmanship. Conditional on the round being rated in some capacity, we are forced to be unfair to either those who successfully searched for the problem or those who didn't. Up to this point, the precedent is that finding the solution to a problem online is allowed, so zeroing out those solutions seems like the more unfair option to me, though it isn't obvious that this is right.
Another thought: One way making the round unrated or removing H would be unfair is that it changes the rules of the round retrospectively, given that the precedent is not to unrate rounds for duplicated problems. This makes me less confident that unrating this particular round is right--I think the rating outcomes from this round are not reflective of what Codeforces rounds should aim to assess, but it's unfair to people who successfully Googled H to change the rules on them after the round already happened.
I do feel strongly that in the future, duplicated problems should be considered a reason to unrate a round, and I'd be happy with an outcome in which Codeforces announces that future rounds will be unrated in the case of duplicated problems (whether or not this particular round is unrated).
Whether or not duplicated problems are a reason to unrate a round meaningfully changes contestants' incentives, so it matters that contestants know whether this is the case before the round. If you know in advance that if there's a duplicate problem, the round will be unrated, then your objective going into a contest is "maximize your expected ranking conditional on there being no duplicated problems", which is different from "maximize your expected ranking". For example, if you knew that if H was duplicated, the round would be unrated, then I think the correct response to seeing a large number of early H solves is to try to solve it without searching the web. In this scenario, if the problem is duplicated the round will be unrated, while if the problem is not duplicated, it must be disproportionately easy; if rounds with duplicated problems are unrated, then you only care about the latter case and should just try to solve the problem. (Comparatively, if duplicated problems are not a reason to unrate the round, the incentive is to search online for a solution because it's vastly more probable that H is Googleable than that H is trivial.)
Am I the one one on here that thought googling was banned? Google is just as bad as GPT in my opinion if it gives the full solution.
It's really weird that in problem D, it was not mentioned that n is always odd, and we should know that it is odd by ourselves
Why would they mention it? Do you expect problems to just tell you observations, instead of expecting you to figure them out?
P.S. The additional constraint in the input section guarantees that the position is reachable from a sequence of operations. This already implicitly says that n is odd.
problem mentioned solution will always exist ... that indirectly puts that constraint I guess.
this kinda amazed me, but i managed to find a complete H solution just by providing chatgpt the statement and telling it to find a similar problem, then solve it according to the tutorial (o3 + o4-mini-high): https://chatgpt.com/share/6803ce12-6028-8006-a3b2-6869a64a0a37
316291703
Can Anyone Tell me please . When The ratings gonna change ?
What is the rule , the system testing is just finished .
might take few hours
About Problem Coincidences (MikeMirzayanov's blog)
https://mirror.codeforces.com/blog/entry/112709
A few thoughts on this blog, which I'm posting here so as not to revive a two-year-old post:
I don't think unrating a round is an assertion that someone did something wrong. The reason to unrate a round is because leaving it rated would be unfair to the participants, not to punish the authors for some perceived wrongdoing. Much as if e.g. the Codeforces servers had gone down for some time in the middle of the contest, we should unrate rounds in the case of duplicated problems because an unlucky coincidence occurred that made the contest unfair to a meaningful number of participants.
I agree that it's impossible for the fraction of contests with duplicated contests to be zero. Again, it's the same idea as if the Codeforces servers crashed: the only way to never have a round damaged by technical issues is to not host rounds, but that does not imply that technical issues are not a reason to unrate a round. It's completely reasonable that 1% of rounds will accidentally contain duplicated problems and it's also completely reasonable to unrate that 1% of rounds.
I don't think people actually remember this task; I assume people found it on Google? I also don't think "knowing how to put the old task into practice" is a relevant skill here or in other cases with duplicated problems. There's a difference between understanding how to put an idea you know into practice and just copying code from another occurrence of the exact same problem. I think it's especially unfair that being able to google a problem successfully is correlated with speaking the same language/being of the same nationality where that problem has been posed before; in this case, the problem originally appeared on a Japanese website, significantly disadvantaging contestants who speak other languages and thus are less likely to find it in search results.
I really don't understand what the slippery slope is here. The most charitable way I can think of to interpret this argument is that if having a duplicated problem leads rounds to be unrated, then the definition of what constitutes a "duplicated problem" or the set of reasons to unrate a round might expand over time? I just don't see why that's a likely outcome here, and I think "people might argue to unrate rounds for bad reasons in the future" is not a good reason to refuse to unrate a round for a good reason right now.
To be clear, I appreciate everything Mike/KAN do for the competitive programming community, and I don't intend this as a personal attack/to pile onto the criticism they receive, some of which is completely unjustified. I just don't think the arguments that have been made for leaving rounds with duplicated problems rated are very compelling, and leaving these rounds rated is unfair to the people directly affected by the inclusion of these problems.
Since this problem was from as recently as last December and had a simple problem statement, I think many (probably more than half) of the Japanese participants who got AC remembered that it had appeared on yukicoder, and could find it without using internet search.
(This comment is not intended to refute your overall opinion.)
Fair point, thanks for the correction!
I think the fraction is a lot higher than 1%. For example, 2081D - MST in Modulo Graph from a Div1 just 2 contests ago had also appeared before (and so has this round's E in hong kong contest).
Even bigger fraction if you include "practically the same solution after transformation" or weaker/harder versions.
Often round announcements will have comments about how this problem had appeared in XYZ contest.
Thus, I don't think its reasonable to unrate round with any repeated problems since that will unrate a very non trivial percentage of contests.
Maybe it is reasonable to unrate contests where standings have been significantly affected. But as an author, I would definitely feel my efforts got wasted for (almost) no wrong on my part. You may not think so, but I would, and so would most authors I think.
how some people were able to find Problem H on the internet, I can't find it unless I know it's from Yukicoder
My understanding is that it's more likely to appear for people who live in Japan, since search engines give different results by geographical location.
Ugh, do I have to use a VPN now? :(
Ahh, I did terrible, but I managed to solve C after the round. Interesting problems A,B,C, will look deeper into the rest this weekend.
when will the rating be updated?
it takes few hours
As it is a prized round, tourist deserves justice. Remove those H problem submissions which are suspected and calculate the rating again I hope that would be fair for everyone .
I hope problems are easy for me :)
So will the round be rated ? If yes when ratings will be updated ?
yes, the round is rated as of now...
ha ha ha
Speedforces round
Am I the only one who got the solution to F and G almost instantly after contest but didn't have time implementing it?
Just noticed zhoujiarun0216 in the contest, here is his scoring.
Some days ago he was farming downvotes, so I searched him on the biggest database OIerDB and found that he is much weaker than I thought, yet.
You can see that he managed to solve A and B each in almost 40 minutes, but D in only 9 minutes. That's not weird enough, maybe different thinking orders.
You can see that all of his three submissions have a slight difference in coding styles, some are more compact and some are looser. Also I noticed in A he used single quotes for single character, but double quotes in D.
Compared to his performance in last Div.4, I really doubt him.
I'm not saying that he was cheating, but all the things were too strange — after all, he has a bet of "unblocking the Luogu account if he solves three problems".
✨ It took over a year, but it's finally here! ✨
So the group put in so much effort to bring two original questions(Problem E and Problem H)?
Two original problems,chat-gptable F,and not unrated?
What are you guys doing???
F is my favorite problem in a long while. With all the negativity around H, you deserve props for making a very nice data structure problem.
Is there any info about caps for top 500?
Hello, I received a notification regarding a possible plagiarism issue for Problem 2096C in Neowise Labs Contest 1. I would like to clarify that I did not cheat or copy anyone's solution. My username is aniru0111, and I believe this was a misunderstanding.
Here are the details of my submissions:
I submitted my first solution in C++ at 21:44, which failed on test case 3.
I tried again in C++ at 21:56, but I didn’t change the compiler settings, so the issue persisted.
Then, I changed the language to Python and submitted again at 21:56, a few seconds later.
The allegedly matching solution (user karani) was submitted in Python at 21:24, around 30 minutes earlier.
Also, karani solved the problem in a single attempt, while I tried it three times with two different languages.
I worked on the problem entirely by myself and did not share or receive code from anyone. If required, I am happy to provide additional details or clarify further. Thank you for your understanding.
— aniru0111
why change language?
I found the implementation much easier in Python and thought it would be better to focus on logic rather than syntax errors in cpp
Subject: Clarification regarding problem 2096B and reference to well-known glove selection puzzle
Hello Codeforces Team,
I recently received a notification regarding my solution to Problem 2096B (submission ID: 316242031, handle: AmanGuptacd), stating that it significantly coincides with other participants' submissions. I would like to respectfully provide some context and clarification.
I want to emphasize that my solution was written independently during the contest. I have come across and practiced similar problems in the past, and one particularly relevant version is the classic Glove Selection Problem, which is publicly available and discussed widely, for example, in this Reddit post:
The Glove Selection Problem – Reddit r/puzzles
This classic version inspired my thought process — particularly in how to handle glove pairings in a blind or worst-case scenario. The logic of maximizing over one hand and controlling the minimums is a known strategy for such puzzles and is part of the standard repertoire of greedy approaches in competitive programming.
Given the widespread discussion and recognition of this problem type, I believe it is very plausible for multiple participants to arrive at similar conclusions independently, especially under timed conditions.
I have always adhered strictly to the Codeforces rules. I did not use any shared platforms like ideone.com or communicate with others during the contest. All my code is written locally in a secure environment.
Please let me know if any further clarification or proof of similar prior work is required.
Thank you for your time and consideration, AmanGuptacd
Deleted Message
....
You've gotta be kidding me
You've gotta be kidding me.
L
It's time to reveal the secret formula and prize winners!
In short it's top3 and participants who had solved one of the problems (from hardest to simplest) first with limitation that no one receive more than one present.
Here are winners:
Top3:
maroonrk
BurnedChicken
ksun48
First to solve:
H. kaichou243
G. A_G
F. tourist
E. Benq
D. LMydd0225
C. H1743-322
B. Golovanov399
A. dXqwq
Congratulations to the winners! You will be contacted via private message soon with instructions on how to claim your prize.
As usual, we used the following two scripts for generating random winners, seed is the score of the winner.