
Hello Codeforces!
I am very excited to offer you to participate in Codeforces Round 1005 (Div. 2), starting at Feb/16/2025 17:35 (Moscow time).
There will be 6 very epic tasks and you will have 2 hours to solve them. All problems were authored and prepared by me. This round will be rated for all participants with rating below 2100.
I would like to thank the following list of orzosities for making this round possible:
- flamestorm for coordinating and helping with problem preparation.
- My army of testers: N_z__, triple__a, sammyuri, _istil, Dominater069, nifeshe, awesomeguy856, Error_Yuan, anango, temporary1, efishel, turska, Wxssim, amoeba4, Wizard_of_Orz, Proof_by_QED, rika, LMeyling, weirdflexbutok, That_Salamander, rewhile, Hori, vikram108, lowbob, doujinshi_master, redpanda, RobinFromTheHood, larush, Jasonwei08, hashman, alwyn, chromate00, lucaski2, theweakestsilver.
- cry for not testing.
- MikeMirzayanov for codeforces and polygon.
- Alexdat2000 for translating the statements into russian.
- You for participating.
Good luck, have fun and I hope you have non-negative rating changes!
Score distribution: $$$500 - 1000 - 1250 - 1750 - 2250 - 2750$$$
UPD: editorial
UPD2: Congratulations to the winners!
From Div2:
From Div1 and Div2:
As a tester, I found the problems really cool! I encourage you to participate and have fun.
As a tester, you can't spell Intellegent without int
As a tester, you can't spell Intellegent without leg
you can't without tell
can't spell Intellegent without e
can't spell Intellegent without eg
can't spell Intellegent without ege
can't spell Intellegent without egen
can't spell Intellegent without egent
can't spell Intellegent without el
can't spell Intellegent without ell
can't spell Intellegent without elle
can't spell Intellegent without elleg
can't spell Intellegent without ellege
can't spell Intellegent without ellegen
can't spell Intellegent without ellegent
can't spell Intellegent without en
can't spell Intellegent without ent
can't spell Intellegent without g
can't spell Intellegent without ge
can't spell Intellegent without gen
can't spell Intellegent without gent
can't spell Intellegent without i
can't spell Intellegent without in
can't spell Intellegent without int
can't spell Intellegent without inte
can't spell Intellegent without intel
can't spell Intellegent without intell
can't spell Intellegent without intelle
can't spell Intellegent without intelleg
can't spell Intellegent without intellege
can't spell Intellegent without intellegen
can't spell Intellegent without intellegent
can't spell Intellegent without l
can't spell Intellegent without le
can't spell Intellegent without leg
can't spell Intellegent without lege
can't spell Intellegent without legen
can't spell Intellegent without legent
can't spell Intellegent without ll
can't spell Intellegent without lle
can't spell Intellegent without lleg
can't spell Intellegent without llege
can't spell Intellegent without llegen
can't spell Intellegent without llegent
can't spell Intellegent without n
can't spell Intellegent without nt
can't spell Intellegent without nte
can't spell Intellegent without ntel
can't spell Intellegent without ntell
can't spell Intellegent without ntelle
can't spell Intellegent without ntelleg
can't spell Intellegent without ntellege
can't spell Intellegent without ntellegen
can't spell Intellegent without ntellegent
can't spell Intellegent without t
can't spell Intellegent without te
can't spell Intellegent without tel
can't spell Intellegent without tell
can't spell Intellegent without telle
can't spell Intellegent without telleg
can't spell Intellegent without tellege
can't spell Intellegent without tellegen
can't spell Intellegent without tellegent
As a tester, holy guacamole
Bro took it personally :)
Bro you built a brute force code to write this!
Yeah, I used set of strings and iterated over all substrings
OMG! you are Intellegent
My delta in this contest confirms that
Should I call you -106 Intellegent?
;-;
As a tester, I can’t spell
As a tester, you can't spell Intellegent without gent
As a non-tester,you can't spell anything
As a non-tester, I will probably find the problems really cool! I encourage you to participate and have fun.
I doubt that Intellegent has eaten the same kind of crayons as the crayon ate by cry
As a participant I would like to ask when we will get another brain rot contest like CF Round 1003 Div. 4
As a tester of this Intellegent round, the intelligence of this tester was tested.
it should be intellegence
As a Live Tester, I hope problems are really cool.
Intelligent round yay
Watch me AC full contest in 3 seconds
as a participant i wish to cyan :)
As a participant I hope to find the problems to be mind-blowing!
hi from discord
hi
hello :)
As a tester, I was not Intellegent while doing my VC.
As a tester, this is my second "as a tester" comment.
As a tester, I can confirm that Intellegent is very good at being intellegent
As a tester, the problemset had Intellegent and very cool problems.
As a tester and Intellegent's more stupid twin, I think the problems were very interesting and I highly recommend you participate.
ඞ
as a participant, I hope to become pupil and have lots of fun!
As a tester, Intellegent forgot to mention me :sobb:
upd: he fixed it :)
Haiya, at least it means you are free to join and win some points :)
Is it you K?
It's not you, it's me...
Dream team, they are on a good side
As a tester, hello.
Orz
As a nobody, this should be an interesting contest
mandatory Wxssim gupta_samarth orz
tarek orz
As Wxssim's GF, I am forced to orz.
orz maxing
mandatory Wxssim orz
as a tester, i turned british after testing the round
As a tester, Intellegent orz
As a non intellegent, Intellegent is orzosity
As a tester, where is AMDlegent
As a tester,
as a participant this cat looks like Intellegent
can confirm
May be there is Codeforces in Codeforces in this round sammyuri
I am sick and tired of all these copy-pasted "As a tester/participant" comments. Give me those downvotes.
Wow great testers
flamestorm round :)
finally an Intellegent round, LETS GOOOOO!!!!!
Goal: Rank Under 2500
why is this blog not on the HOME page?
I hope this contest will stop my downfall
As a participant,I am not a tester
As a participant! I wish cheaters will not come to participate
I like the cat in the announcement
16th will be an interesting day
As a cyan, I hope I am Intellegent enough to solve the first three problems.
<- FEAR
omg Intellegent round!! :catshock:
2nd contest
Bring Reporting Option in Codeforces MikeMirzayanov , so that the community can help cleaning away cheaters.
As a non-tester, I want get green color :)
As a (possible) participant, I hope to reach cyan this round.
positive delta plz
it tooks me days to realize the round author is "Intellegent" instead of "Intelligent"...
As a tester, I am late to comment.
Intellegent orz
This contest is very important.
Wish I can reach Master after this contest!
I mentally screamed through the entire blog after seeing the cat picture—it instantly took over my mind!
I really deserve to be a cyan!!! Lesss go!
I’ve come too far to stop now! No matter how tough it gets, I’ll reach Expert this time.
come on guys!!!
Pray for me to become grand master and for Palestine to be free!
As a tester, I miss my pupil tester friends.
As a participent i hope to exceed 1000
Hope to reach 1700!
Intellegent round; is this my return to CP?
As a genius, I will not become pupil again(maybe)
As a participant whose laptop suddenly died today, I will attempt this contest in Termux
As someone who started learning programming this month why are the easiest problemsets so hard
hopefully Δ ≥ 0
As a contestant, too hard problemset
Agree
Why is there a Coffin in B?
ARE THE RECENT ROUNDS TOO HARD FOR REAL OR MY ALREADY DUMB MIND GETTING DUMBER ????
The easier problems are getting hard to be honest. for me D was much easier than B and C.
Same here. Maybe both, I'm not sure. :thonk:
Anyway, keep trying and goodluck!
why a and b of recent contests are so tough?
AGREEEEE
b is like nightmare fr
This comment made me feel alive
I found C way harder than D.
problem D is dp on bits right? exactly where I'm bad at :(
my solution was not dp. try to think about it this way. the candidates than you might lose to if you go from right to left is not that much (at most 30) because your most significant bit will reduce once you beat a tough opponent. (wont get into details but think about it this way who is the first person that has a chance at beating you. if you beat them what will happen to you)
I do have the same observation, I know the step wont be over 30, but each step can be very long (leads to TLE at 1st submission). I'm stuck at optimize prepare the step down index array.
you need to find an appropriate DS to handle that. What I did was making an array of vectors with length 30 and for each element in the array I did this :
v[mostsignificantbit[a[i]].push_back(i)
Now for the querry q if you assume b to be the mostsignificant bit of q you can iterate on b,b+1,..,30 and find the closest tough enemy to you
yep, same idea. Too bad when I realize what to do I panic as the contest time only about 20 minutes left...
definitely skill issue.
thank you got the initial idea from your comment.. and was able to solve easily then..
goodbye blue
breh that's precisely my experience as well when I got to blue -- nice performance to get there, and then DOWNHILL. dw, it'll come back up lol
Ratings are very fickle i've found. Especially in rounds where many people solved ABC and it comes down to speed and lack of bugs. Your rating change can vary from -150 to +150 with the exact same problems solved.
same for specialist
B was Hard to guess
i had -3 before AC then C came like an 800 lol
First time solved Div2 C
hope i get green <3
Problem $$$D$$$ was amazing
Thank you for this nice contest ^_^
Loved the problems though they were slightly difficult than usual , why is Time limit set to 5s in D?
As a newbie, the problems were nice. What isn't nice is my skill T.T
btw weakest pretest1 I've ever seen. it's literally designed to get WA2 for guesser.
I feel like B's test cases were very weak.
took me half an hour to build solid edge cases (cause i am noob too)
I hope plag check will be strong cause D was leaked on yt ban anyone who has similar code — >
Not sure about D but man if there was plag check in C i guess a lot of people will be false flagged
in my room almost everyone had the same logic and implementation.
C has very small code I agree we cant flag C solutions because question was like a+b? everyone would have same answer
Awesome problems!! Thanks
I confuse F to be an easy segment tree problem but after carefully reading 'all sub array' :0, I realize how naive I am
C pretest 2 D:
C felt way easier than usual felt like I was solving 1000 rated problem
C ruined my contest I spent 1 hour unfortunately :(
maybe its just me , I started thinking in direction of what if there were only positive/ negative values how one should maximize then etc etc
me too. took me long enough to realize that that wasn't the optimal solution. But I didn't have any time left.
how come divide and conquer on dp easy to you?
bro what overkilling did u do , it was simple prefix/suffix calculation
yeah, however, it still took me some time to remove the idea of use 1 dp array into use 2 prefix sum:((
by the way, do you have any idea for F?
bro I closed my PC after reading D
C was really annoying for me
A was difficult than C for me
can anyone tell why my code is giving tle
submission link : https://codeforces.me/contest/2064/submission/306429358
my idea : if msb of x is more than some subset than it will be to eat them and merge into them so binary searching on this how much i can eat
then let say some element came then either it will kill me or it will be merged
so if bs tells no more merging possible
then i will check it by if else coindition
what more optimisations can be done
Hard A, B, C
7k solves on A, B, C
Pick one.
I was also surprised on the number of solves on C. I mean, the ultimate solution was simple enough, but idk...
~~~~~~~~~~ ll n; cin >> n; vector v(n); for(int i=0;i<n;i++) { cin >> v[i]; } ll maxi=abs(v[0]); ll curmax=0; if(n==1) { cout << abs(v[0]) << endl; return; } for(int i=0;i<n-1;i++) {
~~~~~~~~~~~ why is my code failing for div2 C i tested soo many test cases cout << maxi << endl;
This is a standard prefix suffix sum problem. Try to think in that direction. Hopefully you will get it.
my code does prefix sum only
i looked into your code. try out this tc :
6
2 3 -2 10 -8 -1
your code gives 19 but the ans will be more than that. think about it. try to figure it out your own. if you think you need hint or clue feel free to inbox me.
it will be 19 only right
nope it will be 24. you are taking blocks i guess but the ans will not be maximized only with this.
bro your code is some random greedy logic which is completely wrong
here is one test case
9 -6 -5 2
your code output is 11
but the correct answer is 20
first remove -5
then -6 then 9
it can be solved by dp also you can see my code
try to find error in your logic as well
my code is outputing 20 in vscode
my bad i passed array without size
try this
9 -6 2 -5
answer is 20 for this
but yours is giving 15
https://codeforces.me/contest/2064/submission/306399792 can anyone tell me what's wrong in this logic (2nd question)?
as a participant, you can't spell intelligent without "hate" :}}>3
can anyone tell me what was the logic for c?
Is my solution supposed to get a TLE or I missed something?... have already tried my best to it..
My TLE solution for Problem D
For my solution, D was timing out until I cached helper functions between queries
interesting<3
And their brilliant idea is now ruined because some idiot pointed it out publicly! Well done!
I don't know why div-2 have very easy a,b,c problems from previous two contests or may be i am improving because of solving 1600 problems on my alternate id.
Nice, I want to see how people solved D in the contest by checking 4 random people and finding 3 identical code. Totally not sus. Btw here are the codes that I checked Code 1 Code 2 Code 3 Code 4
Screencast with commentary
Does anyone else think there was a lot of cheating today?
Of course there was. But I think there is no way to prevent cheating at this point so the best thing you can do is ignore them and do your best.
Hello, I'm really shocked that I got TLE for my B submission, because it has only 3 for loops which takes O(n) for each, so I think there isn't any reason that I will make infinite loop or something else to TLE, can anyone help me? https://codeforces.me/contest/2064/submission/306374719
I think, it's "Mem"
Well, I don't think so, since I've used that technique for numerous times and check if some element is in dict/make new element in dict in Python is O(1), so the loop that constructs mem only takes O(n) time. Can you explain more why did you think that point makes TLE?
Since, I didn't find any other options. I sometimes saw, Python dictionaries give a TLE; that's why.
Same here, I'm a bit surprised too. I suspect it's because of repeatable inputs in Python. But usually 10^4 inputs work. It's really strange I think that even 10^5 inputs have worked once for me. Almost a half of participants around me got B rejected.
I just found the test cases, and test case 8 is just the case that has one line, which has n=200000, but I'm still feel confused because test case 7 is also in same manner and it took only <200ms...
using dict or Counter in python is a sin... I got FST a few times for the same situation (people blow up hashmap/dict somehow).
If you choose to use map, use random Wrapper around it (value ^ random). To be safe from those hacks.
wait, but in that case, suppose that it's kinda hash map collision, then is it possible to make TLE?
so sad but True, TLE is possible.
source here
Wow, I'm really surprised for that, and as changing to not using dict, I easily got accepted, OMG Thanks a lot!
No prob, I was hurt too by this hacks in Hello 2025. FST and bam bye bye rating. (in my case it was collections.Counter, which is dict based too)
Cool Problem D
https://codeforces.me/contest/2064/submission/306407647 help me please to find a test that does not work with my solution
Finally,I have become Cyan for the fist time!
Too many cheating in today's contest.
Yes, look at all of these people who have the same obvious gpt solutions to problem D. I estimate at least 10% of the people in the top 500 cheated in some way. If someone would make a blog compiling these that would be much appreciated (I have not done any contests, so cannot blog). I'm sure there are more submissions like these, but the slow codeforces servers make it way too tedious to check thoroughly.
https://codeforces.me/profile/CodySummers https://codeforces.me/profile/Ban_Mindeveloped_Please https://codeforces.me/profile/SAAE3 https://codeforces.me/profile/Moiz_khan https://codeforces.me/profile/akkumar.cse https://codeforces.me/profile/Md_Nomaan_khan https://codeforces.me/profile/Dominatrixx https://codeforces.me/profile/mohitprajapati2444 https://codeforces.me/profile/kaushalaknurwar96 https://codeforces.me/profile/MahendraSinghThakur https://codeforces.me/profile/ish1331 https://codeforces.me/profile/Shubham__kumar https://codeforces.me/profile/isogeny https://codeforces.me/profile/Zlin05 https://codeforces.me/profile/mahmmoad_aziza https://codeforces.me/profile/ankit_iiitg https://codeforces.me/profile/lalithcodes09 https://codeforces.me/profile/subhrank https://codeforces.me/profile/Shubhra007 https://codeforces.me/profile/AJINKYA_LAKHARA https://codeforces.me/profile/Mysterio_15 https://codeforces.me/profile/quangdepzai https://codeforces.me/profile/arpitmalik https://codeforces.me/profile/Durgesh_7979 https://codeforces.me/profile/Vodangngoclam2013 https://codeforces.me/profile/nishant_10002 https://codeforces.me/profile/1chandanAAA https://codeforces.me/profile/AlissaCallender https://codeforces.me/profile/acoderforfun https://codeforces.me/profile/bdyby1009 https://codeforces.me/profile/Accclone001 https://codeforces.me/profile/NealMead
Octagons how orz
https://codeforces.me/contest/2064/submission/306390015
https://codeforces.me/contest/2064/submission/306390440
How these two submission is same to same..Even comments
It is so unfortunate. I used to be a Master a long time ago and now even though I know I am better than before I cannot pass expert rank due to cheaters. Problems have gotten more tricky and ad-hoc which is not my style and people copy paste those solutions from chatgpt and get away with it. I just want to participate in a Div.1 contest again :(
how much is the penalty for getting a wrong answer in todays contest
please dont downvote me , im new and arab
The penalty is 50 points per incorrect submission. As I understand, this is approximately the same as: - 25 minutes penalty for problem A - 12,5 minutes penalty for problem B - 8,3 minutes penalty for problem C
Please, correct me if I'm wrong.
Intellegent You are an artist for creating problem D. I could not solve it in contest but that's my bad. The problem is very good.
hi toppers of coding.
cry for not testing — relatable moment. XD
Talk, being online is not discussion
How my solution got TLE on problem B? I think it is a linear time complexity right?
any ideas? thanks!
collections.Counter are dict-based in python, so it's vulnerable to hash collision. For further details what's the cause and prevention method, I'll refer to this source
It's for ME, not for ratist programmer
Subject: Appeal Against Plagiarism Flag for Problem 2064D
Dear Codeforces Team,
I recently received a plagiarism notification for my solution (ID: 306403068) for problem 2064D in Codeforces Round 1005 (Div. 2). This is my first time facing such an issue, and I want to clarify that I wrote the solution completely independently without copying from any external source.
I believe my solution may have been flagged due to:
Common problem-solving approach – The problem might have had a standard or optimal way to solve it, leading to similar implementations among participants. Unintentional similarity – My code might match others due to common templates or commonly used logic. False positive in automated detection – Since I did not share or copy my code, I believe this might be an incorrect flag. I kindly request a review of my case. If required, I can explain my approach and how I arrived at my solution. I truly value Codeforces as a competitive programming platform and want to ensure fair participation.
Thank you for your time and consideration.
Best regards
bro same with me !! As i use java but sometimes java gives TLE, forcing me to switch my code to c++. But i also recently received similar notification, don't no which type of plagiarism detection system are they using...
why my solution submission have been skipped code forces ??
Can any one help me about a question. My code had was given a "Time limit exceeded " in the test 8 of question B. The difference between my Python code and the standard solution is that I used a built-in Python hash table, the set() function, to record whether the occurrence of elements exceeds 1. The complexity of my code should also be O(n). What puzzles me even more is that in tests 5, 6, and 7, which have similar data sizes to test 8, the time taken by my code is close to that of the standard solution (about 150ms). However, it timed out in test 8. I suspect that test 8 might have some special characteristics that cause hash collisions. I don't understand why this is happening and hope that someone with more experience can answer my question.
Thanks,i have finded answer in before comments.
wish you never do rounds again