
Nihao! Hello to all fans of competitive programming and Codeforces enjoyers!
On behalf of Tsinghua University’s Zhili College, we — your proud and slightly sleep-deprived Class of 2028 Information and Computing Science students — are happy to invite you to participate in Codeforces Round 1010 (Div. 1, Unrated) and Codeforces Round 1010 (Div. 2, Unrated), which will take place on 15.03.2025 17:35 (Московское время). Note the unusual start time of the round.
You’ll have 3 hours to tackle 7 problems for division 1 and 6 problems for division 2, the round will be rated for all participants. It’s a little longer than your typical Codeforces round, and yes, we know you’ll be sleep-deprived — but who needs sleep when there’s coding to do, right?
This round’s problems are brought to you by the incredible Ecrade_, newbiewzs, chen_03, 18Michael and sunzh. Special thank you to dapingguo8, Zesty_Fox and Iam1789 who also prepared problems that were ultimately not used in this round.
A massive THANK YOU to the following legends who made this event possible:
The one and only KAN for his invaluable support in hosting the round.
Our chad coordinator, FairyWinx for coordinating this round, finding testers, and providing moral and technical support.
Our brilliant testers: Zesty_Fox, peiwenjun, Iam1789, chen_03, wangjinbo, sunzh, exxqfu, li0201. peop1e_, teraqqq, RP-1, TeaTime, turmax for testing and providing invaluable feedback.
Our fantastic organisers: HeziCyan, Iam1789, cszyf, and KaiSuoShuTong for the smooth operation of the contest.
Our advisors zhou888, RegisterName, Yijie Wang and Xi Wang from Zhili College for supporting our efforts and ensuring school approval.
Big shoutout to DreamingRabbit, president of Tsinghua University’s Association of Algorithmic Competitions, for his steadfast support and unwavering determination in helping us turn this dream into a reality.
MikeMirzayanov and geranazavr555 for enabling this event through the amazing Codeforces platform.
Zhili Cup itself is an annual event hosted by Tsinghua University’s Zhili College along with its freshmen of ICS. We are delighted to meet you on Codeforces this year.
Good luck, and may your code be bug-free and your coffee cup never empty.
See you at the round!
UPD: Here comes the scoring distribution.
Division 1:
Division 2:
UPD2: Due to technical problems, the round is postponed for 30 minutes.
UPD3: The round is postponed to the usual Codeforces time and won't be rated. We (Codeforces team) apologize for these problems.
UPD4: Contest is over! Thank you to everyone who participated in the round even though it is unrated, we truly hope that you all enjoyed our problems and had a great time participating. The editorials will be a bit delayed but we promise they'll be here soon! See you guys again soon!
UPD5: Editorial









Hope U will enjoy our contest!
can't enjoy!
i get it, we are all disappointed
but we can still enjoy the problems
One of the few instances you can live stream solving a contest
Let's forget the technical issues of the platform and enjoy the problems! All of us who have worked hard for this contest will appreciate you!
yes, we can enjoy the div 1 problems without the fear of losing rating! btw, Mike should stop playing genshin impact with the servers haha!
haha
Hi Dominater069, I recently watched a blog on how Codeforces contest problems are created using Polygon, and I found the process incredibly challenging yet fascinating. While I may not have the experience to set full problems myself, I do have some unique problem ideas that I believe could be interesting for contests. If you have any advice on where I can share my ideas or to whom, I’d really appreciate it. I’d love to contribute in some way.
can enjoy
Rating just a digit
says the Grandmaster
says the Grandmaster
I opened my computer at 13:35(UTF+8) Oh postponed to 14:05? Well that's OK
14:05 I refreshed the contest page 404 not found refresh*n...
14:15 Go to m1.codeforces.com
Wait postponed to 17:35(22:35 for UTF+8)? Come on.
Problems seen on m3.codeforces.com? What the *
Me too, i have also seen Problems on m3.codeforces.com, just at start.
LETS GOOOOO!!!!
Hope you all enjoy our problems :)
Me and my classmates and our coordinator worked so freaking hard on this contest, only to be informed of the stupid technical problems.
I’ve suffered a lot in my previous contest as a problem setter, which is rather unsuccessful due to some reasons, and man, mike, now you’ve given me a bigger surprise.
I’m so freaking sad now…
Don't worry bro. We will still give the contest as a normal contest even if it is unrated.
I am sorry for you :( Thank you for all your efforts.
That doesnt stop us from Enjoy solving the problems. Thanks for your Efforts!
DW bro, I will give the contest with the same zeal. I feel your sadness but don't forget that unlike most of us, you have at least been a problem setter. Ecrade_ orz.
Now Zhili Cup has literally evolved into a contest with tens of thousands of participants XD
Tsinghua round hype hype hype
Enjoy our contest :)
Good luck & have fun!
Excited and hoping to get some positive delta in my first ever div.1 contest. good luck everyone!!
This didn’t age well.
just enjoy it!
This could be my only time throughout lifetime to achieve an academic link with Tsinghua University even though I'm from China LoL
damn crazy how only 6 problems and 3 hours, (probably tons of subtasks)
Based on the score distribution, there are no subtasks T_T..
I wish I can get expert in this round after dropping from 1593...
Well that aged well.
😭😭
Just enjoy our problems and have fun!
sunzh!/chongbai
sunzh!/chongbai
We love Zhili Cup!!!
I love you!!!
orz DreamingRabbit
orz PinkieRabbit
3 hours for 6 question. Pretty sure it's gonna be harder than usual.
As a non-tester, I can confirm that this round could be ☠️☠️
Hoping to not encounter TriangleForces again!
Scor
It seems like we can't see the list of registered participants. Is this intentional?
Edit: seems to be fixed now.
As a participant in UTC -5, I am very excited to participate in a night round after a long time!
You feel like you're going to have a bad time.
Massive aura
As a tester, hope you all good luck & high rating!
score distribution?
By the way, welcome to Zhili College.
as a div2 participant I am not sure what to feel about 3 hour duration.
I will have to attempt one problem beyond my rating to feel good. Please share score distribution.
Scoring distribution updated now.
thanks..
1500 then 2000.. noice!!!
this is going to be speedforces + trying to solve 2000 problem for me .. or else I get negative delta
but now u are div1 participant XD due to rating updates have fun and congo on being CM
oh wait .. what just happened ?
oh man, this is so exciting ... I only dreamt of being in div1 ...
now I am more nervous for today's round , my registration is now in div1 though I originally registered for div2
hehe all the best man, I can imagine that feeling
thanks
gonna blame codeforces for my messed up sleep schedule
You should blame the sun. Why can't it shine for 24 hours?
LOL!!!
he should blame him. why he need sleep?
Disagree, sun really shines every time. We should blame the earth. The earth cannot be flattened and face the sun. Therefore, it is impossible to receive light in every place during the running time of CF contests.
:)
LOL.
OMG .. LOL!!!!
I have another solution for you, we need another sun.
This is the ultimate Chinese revenge when it comes to round scheduling.
As East Asian, I like contest after lunch.
What are the chances of a-normie-specialist can solve till D within 3 hours? Let's find out.
The chance is still < 1% until now sadly.
Overriding, runtime polymorphism! Hahaha...
Good luck guys
Div2 suitable for Chinese participants! I don't have to stay up late
Good! The contest called Zhili cup.
Do you know 致理 (Understand the rationale) = Zhili pronounces just like 智力 (IQ) = Zhili?
That could be definitely an IQ cup!
Let's looking forward to the outstanding performance of 300IQ!
I guess div 1 C D = div 2 E F from the scoring distribution.
mysterious eastern characters
I hope to become an expert in this round
arguably worst time ever for EST time 1:35am — 4:35am 😭
wait until you get to M then contests become quarterly
I need to participate in div1 of this round.I had to get my previous account back but Mike never reply to anything,how to contact him?
In this case you reach 1900 in few rounds)
aiming to reach specialist tmr
I will keep my seatbelt fastened for the whole 3 hours and give my best to get back to CYAN today, InshaAllah!
Once again, The color is not changing...
I'm breaking 1700 for sure.
;(
"Good luck, and may your code be bug-free and your coffee cup never empty."
That was the best wish I ever got... though I don’t even drink coffee.
Thanks for hosting the contest! Living in Hawaii, I am quite excited for a more convenient time for my unusual timezone. It's my first div. 1 contest so I'm a bit scared about problem difficulty but I'll do my best. On the bright side, there's plenty of time to try harder problems.
Wow that's cool! Good luck!
As a night owl on the west coast mainland, I also enjoy the time slot.
this aged well lmao
lol yeah I jinxed it
Hope to get +1 and don't fall sleep
PLEASE HELP,the site is loading way too slow for me and the contest hasn't even started yet,is it just me or others also facing this?
im also having the same problem
Same here..
try https://m1.codeforces.com/
replace m1 with m1~m5 for other servers.
as far as I remember there are only m1~m3
thanks, tried to edit before the contest but too laggy, anyway it's too late now.
DelayForces
Delayforces.
Thats another 30 min of sleep I could've gotten.
These delays on every contest are getting annoying AF.
I am having a tornado outside my apartment right now and it's 12:30am and this round got postponed. What a day lol
rip
One refresh costs me 30 minutes.
Another refresh costs me a working day.
Good start time! I don't need to stay up late!
bruh u jinxed it.
I woke up early for this and the server js broke
Now I need to start late again...
Hopefully my redemption !!!
Why are there delays, is the site not able to handle the QPS, how is that possible in 2025 ?
Anyone else seeing intermittent 404s from Codeforces for pages that clearly exist?
Inb4 another 30 minute delay.
Lmao, its now a regular time round, so much for waking up early T_T
Though I guess its not surprising when even m1/2/3 are crashing.
So... I sat on my chair, and watched the clock gone, then 1 hours went but I have done nothing:))) Good night.
Some people were actually able to access the problems so is the round being cancelled?
yes
play Genshin before contest? website crashed
Well, the title has been revealed. I have seen the title in more than one CF discussion group.
First time "404 Not Found" on codeforces.
statements are every where expect on codeforces.
I confirm, all the problems are leaked.
Mike, make the round unrated.
Just now many people get the problems from m3.codeforces.com. Should this round unrated?
Wait m3 worked??? I just got server unreachable for it and a weird stacktrace for m2.
I agree
Despite that the round was postponed to the usual start time, it didn't apply to m3.codeforces.com properly and some people were able to see the problems. It's sad to say this, but seems like we can only cancel the round for now...
Yeah, i saw the first problem of div 2, better start it unrated then.
Now it will collide with Leetcodes Biweekly,,,,,,,Nah Man,,,
choices buddy.. choices
Lets go back to sleep bois!
tell that to the coffee you drank.
Bruh i know how to solve A,B and the title of problem F was extremely self-explanatory :( I would say the round will be cancelled/unrated
But I woke up early for this :'(
what was A and B spoil me
Well, the title has been revealed. I have seen the title in more than one CF discussion group.
Unfortunately, many people (including me) got the statement using m3.codeforces.com before the contest start.
After I finished writing Div2 A, the competition time was changed >_<
The timetable had been changed,bro is going to play Genshin Impact before the contest,lol
Before the contest started, I kept getting a 404 error. And now, out of nowhere, the contest time has completely changed! What is even happening?!
cmon man, this is what I stayed up for ? good night everyone
Unfortunately, many people (including me) got the statement using M3 before the contest start.
Edit: Because of bad internet I posted this comment twice,but i can't delete this comment :(
After solving Problem A, the time was changed. To be honest, I unregistered. Hope that Mike would not ban me.
I cancelled my trip because I wanted to give the contest. Now I can neither go on the trip nor give the contest.
So now I am sitting on my chair pondering over my decisions.
very Well Organized !! right On time
Statements were available on m3, it would be more fair to make the round unrated.
UnratedForces.
Why unrated?
The problems were leaked.
Stayed up until 1am in my time zone to do my first contest. Good to know that it is not only postponed to a time that would have been much more reasonable for me (9am) but it will also be unrated as well!
Becomes more ironic when there is no coding to be done haha
there are still problems to solve
Weak aura, i don't sleep all night for this round.
Same
This is a request to please not downvote the announcement.
Imagine the state of the author, they worked hard to make a contest for us, and due to purely technical reasons it will not even be held as a rated round.
Could Mike leave a comment here to be downvoted?
did you pay mike that he owes you anything? At best some people donated ig. Remember that codeforces is a gift and not a privilege.
This.
Unfortunately, due to technical issues with Polygon and Codeforces systems we couldn't start the round on time. The issues couldn't be resolved in the original 30 minute delay window. We have to postpone the round to the standard Codeforces time today.
Due to the fact that the round is based on an ongoing onsite contest that will finish by that time, and also due to problem leakage, the round won't be rated. We still hope that you will enjoy the problems created by the authors and thank them for sharing them with you.
We want to apologize for this disappointing outcome to the authors and participants. We will investigate the issue and publish the exact reason if possible.
:(
I hope the problem is nothing bizarre and can be fixed soon. Looking forward for the contest tomorrow!
That's so disappointing and regrettable
these things happen, but we still love the platform.
Now some people will be sleep deprived and some will not be sleep deprived depending on the time zone.
I really hope the core reason of accidents like this to be found and be fixed. This isn't the first time we see Codeforces' server acting unstable for no reason (even when there is no contest running on), and we've been waiting for this to be fixed for so many years. It may not be easy, but this really has to be fixed some day.
I feel bad for the authors. But it's ok. Life is unpredictable.
Out of curiosity, any chance of a short post at some point of what exactly went wrong with m3 not having the updated contest time?
Distributed state management is tricky and I'm intrigued where exactly it went wrong here.
Apparently, m3 declared itself as an independent state :D
unratedforces,delayforces
Unratedforces
does CF write any technical blogs on what technical issues were faced or how they are fixed ? just curious about platform side of things.
I stayed up all night for nothing! :(
yes, we know you’ll be sleep-deprived — but who needs sleep when there’s coding to do, right?
Now I´m gonna sleep, Waos!
Lost the opportunity to participate in Codeforces with pay while on the job
noob MIKE,destroy THU round
Guys please do not downvote the announcement, it's not their fault. they as problem setters must be feeling bad as it is.
The leakage of the problems is an unforgivable mistake.
I think the technical team may need to provide a reasonable explanation.
Not the worst kind of leakage, m3 site didn't know about the rescheduling of the round(due to issues with codefores), so the statements were available on m3 on time.
The fastest unrated legend LOL
(delayed to 9:05) Uh well just half an hour that fits a short nap anyway
(delayed to 17:35) *every keyboard in front of Chinese competitors being slapped
(problems seen on m3.codeforces.com) *every keyboard in front of Earth competitors being slapped
Mad. I did not have my noon break for waiting for this contest. I am going to play Genshin.
I opened my computer at 13:35(UTF+8) Oh postponed to 14:05? Well that's OK
I refreshed the contest page 404 not found
refresh*n
Go to m1.codeforces.com
Wait postponed to 17:35(22:35 for UTF+8)? Come on.
Problems seen on m3.codeforces.com
What the *
thu blacklisted codeforces and mike
I am problem setter and I need your upvote to heal my broken heart :(
The only thing Mike enjoys is banning users.He almost didn't fix anything on codeforces in recently years.
If you didn't cheat, then how did you get banned?
I did not cheat.I got banned because I edit some tags.
private synchronized void main(){ networkExplode(); } private synchronized void m3() { justStartTheFuckingContest(); }
I think we should unrate this contest because the problem might have been leaked through a mirror of cf.
I appreciate the decision to make it unrated. I saw the problem list and although I only saw one problem, I'm sure others may have seen more.
I think codeforces has a lot of money to throw around now. They should look into getting better servers. Chess.com has similar (maybe? More people, less input?) load and manages fine, maybe just copy whatever they are doing
Feeling bad for authors and also for me coz I've nothing to do now. :((
I was sick, woke up early, took a medicine to participate in the contest. I really don't understand why we face these technical issues on CF during contest only :(, last contest also the site was down for initial 3-4 minutes for me. I think the servers really need some kind of upgrade to handle the QPS. Sorry for the rant, I will go back to sleep now.
I had the urge to go to the toilet 2 minutes before the contest. I finished number one under 1 minute, only to find out that the contest was postponed. I am very frustrated about this because my stomach is still aching.
What's the matter with CodeForces?
Is it under attack or something else?
A little disappointed...
It is sad for such a nice platform like codeforces to be ruined sometimes by teachical problems.
technical problems are part of the platform
Though all the problems are leaked, I still hope those ones who didn't see these statements can enjoy a made-by-heart contest.
I request, the ones who already saw these statements, don't participate in this contest. In order, to give a normal feeling for other contestants, and not to ruin the scoreboard.
I have already browsed through all the problems...
I will not participate in this contest.
I have finished writing the code of A.
That's not intetesting!
Me too :/
Wow mike this is such an pretty,perfect,excellent try! keep using your awesome cloudflare,banning users and NEVER upgrade your server,your goal of kicking all users out of CodeForces will definitely accomplish sooner!
In my view, sometimes things don’t go smoothly, and there may be some hiccups. However, there is no point in badmouthing the contest organizing team and the Codeforces administration. They put in their best efforts to improve the Competitive Programming community. Let's respect their efforts.
Unlikely that Cloudflare is the problem here...
I will join the contest later even the contest will be unrated. Thank to the problem setters!
Participate
True. And moreover, cheaters won't bother to participate, isn't it?
I agree; it's just frustrating. For me, the usual CodeForces contest time is 15:35 local time, so on workdays I either work or have classes at the university. The only time I can participate in contests is on the weekends, and there are already very few contests on weekends. :(
Regardless of this, I'll participate in this contest.
This is frustrating, especially when u r at 1399.
As an onsite contestant, the lunch is McDonald's.
edit: and I won.
Congratulations!
We just want to see that is the first place's username color black and from India and has been disabled.
Fun fact: The start time is usual now
Can't imagine the problem setters' frustration.
It seems that unfortunately things did not go that smoothly. But, at least, you can still enjoy the fantastic problems.
Round will be unrated? why?
problems were accessible from m3.
there were some server issues, and then leaks on m3, and then this
Although the match is unrated, I am still looking forward to it
Thank you for the problem setters and testers for your hard work. I look forward to the problems, and am going to put my best into that and the next contest from them. Good luck to everyone.
Why don't you want to make the contest rated? It has been a 5 days since there have been any contest. We have been waiting impatiently for this contest.
Users were able to get early access of the problems in the mirror site. If this round gets rated, then it won't be a fair contest.
Thank you.
Is the contest judged?
It will be judged, but it will not be rated
CF contests are getting less and less frequent :(
Unrated why??? :(
Some people have already seen some of the problems on the mirror website. It will be unfair if this round becomes rated.
Will it be mathforces?
Why this round had unrated , Did the questions were seen by some contestants ?
enjoy:)))
why is there no rating?
For no reason
it would be better to make it rated, but there is no point in participating.
If I get negative delta then I will not do cp again !!!!
dw this is unrated
you got it
who tf force you ???
do cp just for fun not for the fuc**ing rating points
I enjoy it that just a sarcasm that's it
My condolences to the problemsetter team, I hope people can still enjoy your contest <3
It's really strange problems. Can't enjoy.
So finally this round is unrated?
Is there no late registration?
i also forgot to register, and i can't participate now.
People who solved div2F are removed,why?
problem 2 is notcorrect. This is a ridiculous mistake.
how are people solving it then? although I dont understand why my solution is giving WA
just think out of the box :)
hope you'll get the logic soon
lol I gave up after second WA
try again diddy
nah bro it's correct and a very good problem
it was a CP contest or a math test? thanks for unrated :3
Problems are actually pretty interesting. Just look at how many ppl made wrong submissions for Problem B over something because of a small mistake :)
i'm feeling bad "this is unrated" :(
Amazing thing about B is:
Gpt could not even solve it!
A huge thanks to KaiSuoShuTong and all the organizers for this round. We don't care that it's unrated
I reckon the whole point of a contest is to make it a blast for folks participatin', rather than tryin' to stump GPT
usually gpt can solve min 2 problems of div 2, that's why i mentioned that
B is really a very good problem, participants will feel so dumb after the contest :)
right, my point here is if problem setters make problems which GPT can't solve, then the standard of problems has to be significantly tougher and would be quite difficult to participants as well
wtf are these problems and why so many people wa on b
nice bro you solved it in one try, I ended up taking 16 tries..., but I got there in the end!:(
I got hella lucky I didn’t realize only like 700 people ac’d this Gj on ac bro
WA because of bad greedy. I step on the same trap as people do.
My first greedy idea is if curr_n is odd I'd use ceil to maximize curr_n. But it's bad.
The better greedy is just use 1 operation till it's exhaust.
Div1C was really cool, but for the life of me I cannot figure out how to solve it.
how to solve B??
be greedy, if you want min u should use all ceil operation first. if you want max u should use all floor first.
ohh! thank you, i was thinking about, what if the number is odd? should I try 2nd operation then to maximize, thinking a lot of complicated stuff.
Yes I was WA the same way.
My 2nd attempt was dp on N M. But while implementing, I spot the better greedy strat so I wasted a lot of time.
I had the idea of using ceil operations whenever x is odd for maximum answer.. why do u think thinking this direction is wrong ?
it will fail on test with very large M but small N. In that case you want to exhaust the floor 1st so the max will be 1 not 0.
i.e my own test
Output is 0 1
Unfortunately, 2081D - Минимальный остов в модульном дереве is an easier version of COCI 2017/6 — Sirni. (I think it's a coincidence.)
:(
What was the expected time complexity of problem D mysolution is in n * logn * logn. TlE on testcase 16.
My Submission
I think you can remove a log: read this comment and its replies.
thanks
nvm
Thanks a lot for the fun problems. Really enjoyed the contest :)
Have the idea to calculate div2C, but have no idea how to implement effectively...
same buddy c is a very nice problem i try to come up with some sort of solution but failed!!
Finally solved with extra 1 hour...
My implement on fraction and mod is really sloppy rofl.
can you explain it to me
I solved it in my notepad by brute force then take the observation.
843 1101001011
110100110 (0.5) 110100101 (0.5)
11010011 (0.75) 11010010 (0.25)
1101010 (0.375) 1101001 (0.25 + 0.375 = 0.625)
110101 (0.375 + 0.625/2 = 0.6875) 110100 (0.625/2 = 0.3125)
11011 (0.6875/2 = 0.34375) 11010 (0.3125 + 0.6875/2 = 0.65625)
1101 (0.65625 + 0.34375/2 = 0.828125) 1110 (0.34375/2 = 0.171875)
110 (0.828125/2 = 0.4140625) 111 (0.171875 + 0.828125/2 = 0.5859375)
11 (0.4140625 + 0.5859375/2 = 0.70703125) 100 (0.5859375/2 = 0.29296875)
1 (0.70703125 / 2 = 0.353515625) 10 (0.29296875 + 0.70703125 / 2 = 0.646484375)
1 (1) (9-10 step)
The observation is:
I've write down the state transfer between 00, 01, 10, 11 and its Probabilities transfer too. (At first it was 4 if-else but I shorten it).
The rest is just fraction and modulo implementation.
no like i got the difference thing just by doing log2(x) and taking the ceil and floor value i want the fractional one??
Sorry I don't get it, maybe we have different approach?
Thanks for the round! Despite the circumstances I enjoyed it.
Probably Div1G is a bit too technical (the statement is clean though).
Div1B is great, I struggled both with thinking (with actual construction!) and implementation (short!).
Was the optimization to go from G1 to G2 just to replace all integer divisions with double divisions?
Seems really strange to me to test constant factor optimizations like this (esp. since the latter is actually slower when testing locally ...).
My code for G1 already ran in <5sec locally for $$$N = 10^{12}$$$. After TLE I brought my faster template for prime sums, and with it I was able test the speed of division (long long vs double). I heard that the speed of division is highly dependent on CPU. Actually with long long division it was just around 10sec.
I guessed G1 is for (1) rescue bad constant factor (2) allow embedding solution (much easier). Still feel a bit strange though.
I really like problem 1B Balancing, it's so cool lol
B question BE like:
Myself included got trapped.
Very good problems!
Why is my B-question evaluation result 'Judge Failed'? I submitted the same code again and it passed. Fortunately, this game was not timed, otherwise it would have been troublesome.
Can somebody tells me why my solution on D got a "Judgement failed", and after competition, I submit the completely same code, it gets "Accepted"?
same here. same same.
I have provided this information, and I think it will be corrected soon
Nice contest. C description helped me visualize and solve B.
How to solve div2B?
be greedy, if you want min u should use all ceil operation first. if you want max u should use all floor first.
Do you have a proof to why this greedy idea works?
nope it's one of my wild guess
310781105
The reason for limiting the iterations to 30 (Because
2^30 >= 1e9) is that after 30 halving operations (whether floor or ceiling), the value ofxbecomes very small, typically close to 0 ( 0 for floor and 1 for ceil),0≤x≤1e9.More than 30 iterations are unnecessaryand do ceil oper2 for min first and oper1 for max first
I see. We limit the number of iterations and do greedy (as also stated by the reply above). Your implementation is really nice.
Good problem!
Can someone point out what's wrong with my code/Counter test case 310766775 for B
Try:
15 2 10Output is: 0 1Excuse me, whats wrong with me? Why my submission "Skipped" and "Judgement Failed"??? Even though I don't use AI tools or any 3rd party code... https://imgur.com/a/zqtbTps
UPDATED: My 2nd submission was rejudged and "AC"
Same thing happened to me, even though I didn't use any AI tool.
t
Can anyone hack 310785316? The code is an incorrect implementation of Boruvka's algorithm.
aryan bro plz make a pcd for this round
1B is a cool problem. Pure logical thinking and elegant implementation.
Much harder than before
vp before the contest? hmm,,,funny, isn't it?
Excuse me! Can anyone say why this approach for div2B is wrong for finding the maximum one 310784355.
It is basically, if the number is odd, then use m(if available); and if the number is even then use n(if available)
for maximizing you have to use the first operation first irrespective of parity if first operations have been exhausted switch to operation 2. if x is even it is pretty obvious to use the first operation. if x is odd if you use op1 x-> x/2 but if you would have used op2 it would have been x/2 +1 however if you have remaining op1's
(x/2+1)/2 is result of op2 and then op1
(x/2)/2 +1 is the result of op1 and and then op2
i.e. (x/4 +1/2) vs (x/4 +1) thus clearly using op1 first is advantageous for maximization.
I'll try to explain for max:
Think of it like this, the max can only be 1 more than the min, and to "carry" the 1 difference all the way to the end, OPER1 count should be 0 and only OPER2 should be left. If you use OPER2 before finishing OPER1, you reduce the amount of OPER2 you have at the end. Basically, you want to get to such a point, that x is odd and only OPER2 is remaining to get the 1 difference. You can think similarly for min.
Example: x = 21, n = 2, m = 2
21 -> 11 -> 6 -> 3 -> 1 (your approach)
Please add tutorial of this contest .
Sorry for the late editorial. We'll add it soon (within 5 hours possibly). The problem setters were so exhausted with the offline competition yesterday that they need some rest.
Now the editorial is finally released! Go and check it out!
why is there no editorial?
Sorry for the late editorial. We'll add it soon (within 5 hours possibly). The problem setters were so exhausted with the offline competition yesterday that they need some rest.
Now the editorial is finally released! Go and check it out!
I enjoyed contest without damn cheaters
I understand cheaters affect rating post-contest and honest people might not get the delta they deserve, how do they affect your experience during the contest?
I am just curious ... I am not defending people who cheat, they should be penalized.
Contest is measure of your skills and level. With shitty cheaters you can not correctly measure your performance and because of this you dont know your level. Which problem was really hard or easy and etc. Its negative experience. I didnt say that I enjoyed contest only due to absense cheaters problems were good but I could measure my performance and skill properly.
P.S. Fucking cheaters you can dislike my comments more you're welcome
I understand your frustration and cheaters suck... but let us keep learning..
In contest you do not learn anything, You just solve problems which are expected to solve by you.
Can anyone please explain me the last tc of the div2 D. I am not getting how the answer is 3.
[1, 9, 1, 9, 8, 1, 0] => [1, 9, 10, 11, -1, 1, 0] => [1, 9, 10, 11, -1, 1, 2]
=> [1, 9, 10, 11, 12, 13, 14]
I don't know why I was accidentally added to the polygon of this contest before it started, but luckily I have retired, so it doesn't affect me much.
I’m really upset that I have to wait another two weeks for the next rated Div. 1 contest, and as a Chinese competitor, I have to wait a long time for the contest during the day.
But it seems that another Div1 contest is on Sunday at 13:35 UTC+8. Hope Codeforces can hold that contest successfully.