Hello, Codeforces!
I am very excited to invite you to our contest Codeforces Round 1037 (Div. 3), which starts on Jul/17/2025 17:35 (Moscow time). You will be given 7 problems and 2 hours and 15 minutes to solve them.
The problems were authored by me, __rose, Pishka12, Chalishkan and I_HATE_MD_DM to solve and alter them.
The round will be hosted by the rules of educational rounds (extended ICPC). Thus, all solutions will be judged on preliminary tests during the round, and after the round, there will be a 12-hour phase of open hacks. After the open hack phase, all accepted solutions will be rejudged on successful hacks. Also, note that there is no score distribution — rank will be determined by number of problems solved, followed by penalty; wrong submissions will incur the usual penalty of 10 minutes, following the rules of educational rounds.
Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:
- take part in at least five rated rounds (and solve at least one problem in each of them)
- do not have a point of 1900 or higher in the rating.
Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.
We would like to thank:
- Vladosiya for wonderful coordination.
- Away_in_the_heavens for help with problems.
- sstrong, Wansur for red testing.
- N29, dsolunov, daukah, parkky and ImDMka for orange testing.
- newhandIe, accord, Duukh and QazLon for purple tesing.
- itz_pabloo, APMAH, Dif1rent, MaGnsi0 thespace, I_LOVE_vinnipuh01 and Makha for blue testing.
- IceHydra, 1BR444H1M, Yozhik, NexTopper and VOP-Ansish for cyan testing.
- uropeltidae, KOI and D_D for green testing.
- abylaj-shymer-2026 for gray testing.
- MikeMirzayanov and KAN for the great platforms.
- Vinton Cerf, and Robert Kahn for inventing the internet.
- You for participating!
GL HF!
Also I would like to show you the beauty of our country's nature with the stunning backdrop of tourist Peak (3965m)!









Hope to reach Expert in this legendary contest!
I am also hoping to reach pupil in this contest...
good luck sir!
When will rating would be updated for this round. I'm still waiting.
Bro When will rating usually get updated any idea I have given my first contest and Got First Problem ACCEPTED still my account is showing unrated.
Probably when system testing for this contest gets completed. You would see percentage.
Reaching Expert after solving just 50–60 problems? How is this even possible? Share your secrets, legends!
It should be 4009
or any greater than 4000
The peak needs some more time and practice to truely becomes "tourist Peak".
as a tester this round is good
Dude, you haven't even tested.
bro have inherited all testers comments.
as a tester this round is peak
true.
All the testers say the same thing
As a problem setter, I hope you will enjoy these amazing problems.
As a problem setter, throughout heaven and earth this round alone is honored one
cout<<"I hope " <<endl; cout << "This round == Legendary";
legend bro
Well, it was a so-so Olympiad, I worked with all my heart and took a normal place out of 40,000 and I got a -4 rating, it's not fair
I wanted to become an expert in this division
Yusuf legend
Hmph, You wished.You add complicated inputs to the easy ones, and easy logic to the hard ones. If I had time, I'd finished the hard ones .
As a first time tester wish positive delta for the ones who r ready to sacrifizs anything for it
i was at this peak and the views as beautiful as the tasks on this contest) gl & hf for everyone
As a non-tester, I want to test a round, please some coordinator allow me to do one!!
as a tester have fun everyone
Hope to get back to specialist this round (skill issue)!
Hope to reach Expert in this legendary contest!
giving credits to the fathers of internet is a sweet gesture ^-^
I'm so excited — the contest is finally coming
As a participant, I can guarantee there exists some undiscovered peak, 44m higher than this.
Ah, if only I could become an Expert in this contest!
Hope to be cyan
As a participant, I don't think tourist's peak is 3965 cmon guys
Tourist has exceeded the peak.
In Round 1035,I got 128 rating and reached Expert,but in Round 1036,I lost 103 rating so I back Specialist. All in all, bless i can reach Expert again:)
similar thing happened with me as well
I hope I solve A — D
hope to reach green!
"Vinton Cerf, and Robert Kahn for inventing the internet." Ok this was funny lol
As a hike-aholic, the mountain successfully drew my attention!
im sorry guys, pls dont downvote me, i just want contribution
As a tester, I wish everyone a smooth contest, green submissions, and a positive delta.
Who are you?
Please update the tester list, as I tested this round.
Are you sure?
Yes, I’m sure — you can check the testing records
How does it work if I participate in this contest, but after rollbacks I become expert right before the contest?
As a first time tester, this is definitely one of the peak rounds of all time ( glhf everyone :) )
your videos are really goated fr
Saar singhsoumya_coder, please redeem uncode cards in this round to have your honorary 5-th skipped Div3 contest Saar !! Show them you are unbeatable in code obfuscation Saar !!
I HAVE to participate
Glad to see that this round was tested by people of all ranks. I hope the problems are good.
hmm
.
Hope to make a comeback
tourist peak
As a non tester I hope to have access to the contest questions on advance
hey guys, I am on a journey to get a coloured rank. If I flopped in this contest, the roast is free—no need to hold back.
It motivates me.
You can do it, bro.
A bamboo doesn't grow an inch for about 3 years before it grows to around 90 feet in just a couple of weeks.
I've been stuck in newbie for more than a year
Expecting as usual another round of div 3 that C or D will be harder than the next.
Hope that D is not mind-tricking :)
I find mind tricking problem enjoyable, since I don't know many ad-hoc problem
After a 10 days long break...
Why are geometry problems so rare in codeforces. I would love if problem setters made more geometry problems instead of Constructive or Permutation. though i don't hate them
Graph questions are much more beautiful.
Hope to solve 4 problems in the round.
%%%
I will reach pupil in this one! :muscle:
Has something changed my penalty meter kept increasing it was 100+ even though i did no wrong submission?
no, because someone is more wrong answer than u :)))
Bro, it was too obviously that you have used chatgpt
Correct submissions count towards total penalty too (just their submission time).
Loved F. Errichto's video about heavy/small nodes came helpful. Also amazing test prep for F. I had to safeguard memory + use unordered map with custom hash
Author's solution uses only maps and dfs
would love to see that. as soon as I saw that it depends on degrees, I immediately did heavy/light nodes. Got 5-6 TLE's and one MLE. one WA too cuz I forgot heavy-heavy case. but overall an amazing problem
Thank goodness, I was confused after seeing very lenient constraints and hearing about $$$\mathcal{O}((n+q) \sqrt{n})$$$ from everyone I asked, while I had $$$\mathcal{O}((n+q)\log {(n+q)})$$$
I thought everyone will solve like this
There also possible to solve $$$ O(n+q) $$$
my $$$\log$$$ was from a
std::map, so I would guess your solution uses hashmaps to reduce one $$$\log$$$. Not sure about existence of any deterministic $$$\mathcal{O}(n+q)$$$.No i just answered query separately by their color, and did some math
I think that you can use radix sorting in base $$$n$$$ to perform number compression, then just use a static array instead of a hashmap. This provides a deterministic $$$O(n+q)$$$ solution under the given constraints.
F is a good implementation problem, my solution also uses maps and dfs 329523385
one can use an array which tracks how many colours does a single colour shares edge with,
Could you please share the link to his video? I couldn't find it on youtube
Here
watch from 9:36. also practice the problems suggested in his blog
Thank you!
Just wanted to ask, should I study these advance algorithms now at my level, or I can do it later(become specialist and beyond without them), from my profile you can see, i am frequently around rating 1250
I think using
unordered_mapwith default hashing is fine, because the keys passed tounordered_mapis small enough (up to $$$2 \cdot 10^5$$$). My solution usingunordered_map(329528711) has passed and is fast enough.I already got 5-6 TLEs so I didn't want to take any risks.
Can you specify which video, I'd like to watch it.
Noice, good questions for my first ever contest ever. was scared to start codeforces but finally gave it a shot after 8 months of DSA grind. how well of a performance is 4 questions?
I think it is very good performance for first time :)
for real? thanks man
How to solve A?
https://mirror.codeforces.com/contest/2126/submission/329521554
Here's my relevant code. You just needed the smallest digit that appeared in the number.
:D
Python makes it much simpler :)
you just find the minimum digit in the number and thats your answer you do it for each value
Just Input a string and sort this . then print the front element .
I was in queue for A submission for like 3 mins like what was that
it's common situation on Div 3/4 round; Therefore, use m1/m2/m3 codeforces
damn math questions damn damn damn
Well the questions were so good. I have given the contest for the first time. I am beginner so my goal was to understand the question. So I solved 2 questions out of 8 and understood the other 3 problem statements but couldn't do it.
Problem F is cool
problem $$$F$$$ was cool, I think this is the first time for me to use some SQRT decomposition technique in a live contest xD
also, some solutions for problem $$$G$$$ worked on the hard version but got TLE on test 17-18 on the easy one !^_^
we can use an array to precompute how many colour does a single colour shares edge with
In D , to think of boundaries as l ans r were given variable names but was a distraction.
Hi can you share me your approach for D. My Approach is failing at test case-2
Intuition:- If casinos are having overlapping intervals, then any casino can be won
1) Sorted array (descending order of r)
2) Linked casinos with overlapping interval
3) Assigned linked casinos with max possible value
4) Search for first casino to start with
Edited:
I figured out out edge case
n=2, k=3
3 5 3
4 10 10
correct answer=3
output=10
I was using DSU like approach to merge all casinos with overlapping intervals into same group and assigning them their largest reachable value, but turns out we can't win any value within range [l,r] for a casino, rather we would have a specific value 'real'. Thus we can't guarantee that we can play at any casino which will have an overlapping interval
Sorry but I am unable to understand your approach properly, but let me say this that think very greedy, maximizing coins is the goal so sort real[i] array and check if you could achieve the next or next to next or next to next to next and so on.. Thank you
You can just simply sort the array in the increasing order of their realis. Then start iterating and check if you can play on that casinos for that {l<=k<=r} and also check if that casino reali is larger than your k {k<reali}
So the main check will {l<=k<reali} then only update k=reali else just don't play at that casino,skip that .Iterate till end and return the k;
329428651 My greedy + sorting approach
This is my first contest. And i solved first two problems. this contest and result will memorable for me.
thank you
cool bro, it's just beginning; Good luck!
how can even around 12000 users solve question d.
I wasted a lot of time on it until I realized I had missed an important piece of information given in the constraints, that $$$l_i \leq real_i \leq r_i$$$. This makes the problem way easier.
omg how did i miss that, i spent so much time on that problem :(
Thank you for the comment — just realized I've probably written a solution that allows to lift this constraint on $$$real_i$$$: 329491170 (I did not double-check this fact, but it seems to be true)
I was wrong. It does not
At first, I thought this problem was difficult. But when I noticed this constraint, I was like WHAT!!!
almost 20% of them are cheaters
MathForces
How to solve pF? I think I got TLE because of the heavy node (the node with large deg)
Same question. How solve F?
map + dfs
Problem E royally f*cked me.
How to solve D mannnn???
Just use greedy approach,sort the given array based on coins and always consider taking coins because of real<r constraint for each case.One edge case is,before taking any coin check if number of coins is greater than current coin number.
Just sort the casinos you receive by the amount they are going to give you (because going back is pointless) Then you greedily check where you can advance.
I thought about it greedily. If we sort casinos by l. Then, start from lowest l casino and greedily pick casinos that increases the value of coins. We can do this because an increased coin value with always ensure #coins>=l_ahead, where l_ahead casinos with larger l values than current l, and if this new coin value makes us miss a casino, then that casino was useless anyways as this happens when #coins>r. l<=real<=r for any casino is the key
I also used the same approach.
You can just store the value in a vector using tuple and then sort the vector on the basis of the first value of the tuple and just iterate over the vector and then just see if coins >= get<0>(v[i]) && get<1>(v[I]) and set coins = max(coins, get<2>(v[i])).
Time complexity: (O(nlogn))
see my code for better understanding:329480826
you are using sort, will be O(nlogn)
problem D idea was based on one of the recent LC problem (in my opinion) i was not able to solve that problem on LC but this time i solved it in 1 go code -> 329490928
overlooked the constraint on each value — specifically that l<=val<= r. , kept writing up a graph soln for 30 mins and messed up the whole contest. This is so depressing :(
How to solve E ?
create a list that is lcm(p[i], s[i]) and recreate p and s and check if they are same
and why does this work?
https://mirror.codeforces.com/blog/entry/144844
check if res[i] = lcm(a[i], b[i]) works and if not then nothing can work
I did something way more convoluted than what's being suggested. I checked if p[n]==s1 and then for i from 0 to n-2: gcd(p[i],s[i+1])==p[n]. Also checked each of p and s are valid by checking if p[i]%p[i+1]==0 and s[i+1]%s[i]==0
To construct a valid array
asuch that:We observe the following:
From
p[i] = gcd(p[i-1], a[i]), it must be that:p[i-1] % p[i] == 0From
s[i] = gcd(a[i], s[i+1]), it must be that:s[i+1] % s[i] == 0Since
a[i]must satisfy both prefix and suffix GCD conditions, it must be divisible by bothp[i]ands[i]. So:a[i] % p[i] == 0anda[i] % s[i] == 0⇒a[i]must be a multiple oflcm(p[i], s[i])To check if such an
a[i]is valid, try setting:a[i] = lcm(p[i], s[i])Then check whether:
gcd(p[i-1], a[i]) == p[i]Substitute
a[i] = lcm(p[i], s[i])=
gcd(p[i-1], lcm(p[i], s[i]))=
gcd(p[i-1], (p[i] * s[i]) / gcd(p[i], s[i]))=
p[i] * gcd(p[i-1] / p[i], s[i] / gcd(p[i], s[i]))So, for this to equal
p[i], we must have:gcd(p[i-1] / p[i], s[i] / gcd(p[i], s[i]))== 1If this condition fails at any index
i, then no valid arraya[]exists.can you explain a little more
after some math you reached here : p[i] * gcd(p[i-1]/p[i] , s[i]/gcd(p[i], s[i]))
why this should be equal to one ?
not whole should be equal to 1 only gcd(p[i-1]/p[i] , s[i]/gcd(p[i], s[i])) should be equal to one as gcd(p[i-1], a[i]) = p[i]
I have updated the above explanation hope you will be able to understand
Can you please told me why a[i] would be the lcm , and cannot be more than .
And how testing just for a[i] would be sufficient
And Thanks !
Missed the condition l <= real <= r in D. RIP
Same with me dawg wasted all the time there.i couldn't even do anything
I just didn't write this down and missed question E. What is the use of this one condition?
gcd should be same of whole array so these are basically all elements
I think you mean
p[n] != s[1]implies no answer possible? This is because both quantities represent the gcd of the entire arrayHi Codeforces!
In today's problem E, i was confusing about one thing
What is the difference between gcd(a[i], b[i]) != a.back() and gcd(a[i], b[i + 1]) != a.back(), imo the should give the same value however the first one is WA and the second one is passed
Thanks in advance!
Consider the case when
p = [8, 4]andq = [4, 8]. In this casegcd(p[i], q[i]) = p.back()for allihowever not forgcd(p[i], q[i+1]). You need to check for both conditionsthanks very much
The problems are good, but I think the samples are too weak...
So many penalties I have made...
Specifically for C and D
I can't think straight about E
how did you guys think about the problem ?
I know it's the LCM but why ?
i thought about 4 checks:
1) for the prefix array , p[i]%p[i+1] ==0
2) for the suffix array, s[i+1]%s[i] ==0
3) p[0] == s[n-1]
4) gcd(p[i],s[i+1]) == p[0]
I think 3 and 4 conditions should be like this
3) p[n-1]==s[0]4) gcd(p[i],s[i+1])==p[n-1] for each i 0 to n-2yeah my bad , mistyped those
Beautiful problems, especially F! Really enjoyed solving the tasks :)
For problem F, I'm seeing a concept of heavy light decomposition. Can this problem be done without it or is it necessary? Was trying to optimize cost update by storing what is the total edge cost for particular color of neighbors for every color and every node, but didn't work.
ofc, u can use heavy light decomposition, but it will be easier to use dfs+map
How to solve G2?
I had a solution where I fixed the minimum element of the subarray (let's call it x), and the goal was to find the maximum possible median (y) of any subarray that contains x.
It's not hard to prove that the subarray must either start or end at x, because at least one half (either left or right) need to be dominant so we will only take that part so it is just finding the maximum prefix/suffix starting/ending from the index of x (we are going to model the problem for prefix).
Now, for a fixed x, we can binary search on the value of y. For each candidate y, we transform the array into +1 if the element is ≥ y, and -1 if it is < y. The idea is that if the number of +1s outweighs the -1s in a subarray, it means elements ≥ y are in the majority, so the median has to be >=y.
To efficiently check this, we use persistent segment tree to find the maximum prefix sum starting from index of x. This can be Done with a combine function where answer of node represents the maximum prefix sum in the current node => answer of current node = max(answer of left node,(Number of Elements >= y in left node + answer of right node)).
you don't need a persistent segment tree
How do you fix the value of x? Checking each x isn't optimal and doing binary search for x doesn't make sense either.
You can fix the minimum with NSE and PSE and for a fixed x you are doing binary search on the maximum median
i think you should try fixing median
like common technique build array with ele greater than med as 1 and ele less than med as -1 then find subarray whose sum>=0 ans update ans = max(ans,med-min).
to do this just iterate medians from n to 1 and maintain segment tree and whenever you update pos of your median as 1 in segment tree you call update query now we can say that our answer can grow if subarray include this position so when you are calling update you go to those l,r which include this positon so while calling update you also try to update your answer just maintain max prefix sum max suffix sum total sum and min elemet in segment l,r
now when you are standing at l,r
now you have 3 options
option-1 if(sum of l,r) >=0 ans=max(ans,med-minimum of l,r)
option-2 int val=maxsuffix sum from mid to l
now query the prefix mid to r such that val+prefix>=0 and find the minimum in element in this
prefix and update answer ans=max(ans,med-miniprefix)
option-3
int val=maxprefix from mid+1 to r
now query the suffix mid to l such that val+suffix>=0 and find the minimum in element in this
suffix and update answer ans=max(ans,med-minisuffix)
just check my implementation
https://mirror.codeforces.com/contest/2126/submission/329546875
I tried to hack others' solutions of F but I got unexpected verdict. Could anyone point out my mistakes please or is there anything wrong like this ?
Edit: it works now
btw, the tests of F is really weak, and solutions of O(nsqrt(n)logn) could easily pass, and this generator could hack them
Could you try hacking my F's solution ? Edit — I think my solution is quite similar to yours .
i think your solution is correct
Oh I see . Thanks !
Hack mine pls, it's nsqrt(n)log(n), but strangely 800 ms
I have tried to hack but I got unexpected verdict... Maybe the testers' solution are wrong?
I'd assume it's the trailing
\n.Hacking doesn't like extra spaces.
I replaced
\nwithendlbut it doesn't work ToTI mean, remove the ending
\nentirely. No extra whitespace should remain in the test case.Hack like this? But it doesn't work, or sorry for my misunderstanding.
Thank you but it seems not to be the main reason because hack I made earlier is successful now https://mirror.codeforces.com/contest/2126/hacks/1138270.
Maybe the administrators rejudged them.
Today's F is one of the best problems I've solved in the last few months. Perfect Contest :)
Editorial??
Me during contest: A-F: that easy? G1-G2: that hard?
First time solved till problem D
wonderful div3, thank you
how to solve F?
let's say when you change color of a vertex from x to y, then result += score[color[x]]-score[color[y]].
You should init the trees with dfs/bfs to set up the color map (for its children) and its parent color update(just 1 edge) for easy update. Overall complexity should be O((N+Q) * log(N+Q)).
Oh Thanks!
Can anyone to help me, why this submission has TL https://mirror.codeforces.com/contest/2126/submission/329511588 Logic: Sqrt-decomposition by questions. I support values for question vertexes and recalc all variables when we have many questions. gg — graph for question vertexes Sorry, my english very bad
vsem pohu bro
zakroy eblo bro
bla obidna((
poplakay
Turbo KUZ 69
Turbo Artemka 69
tried solving G1 with ordered_multiset to get the median but got TLE, can anyone explain why?
submission link: https://mirror.codeforces.com/contest/2126/submission/329538028
Same.
ordered_multiset has a huge constant factor
Can anyone please provide solution for F with HLD.
Here
its not HLD, its heavy/light node sqrt trick. HLD is Heavy Light decomposition
Ok sure I don't know this will learn it. I know only HLD.
While reviewing the preliminary contest standings, I found two contestants whose activity appears suspicious: they submitted solutions to every problem within minutes, and the coding style differs markedly from one submission to the next.
WHAT!!!. I've never seen something like this before.
Also bro !!
Hi guys, where can I find the tutorial/editorial? Or is not out yet... this my second contest so im kinda lost
It is not out yet
There name also the same for the first one
HOPE TO REACH PUPIL IN THIS LEGENDARY CONTEST 10/10! FROM MYSIDE
Oh man, for the C problem I was just checking the exact difference between jumps although should've been that exact or can be less than that. Totally missed this, just now changed == to <= and it got Accepted.
F was very cool
My best performance ever! Waiting for rating update ^^
Hey Can Anyone tell me that I have given my first contest untill then I was unrated and I have submitted my first problem which got ACCEPTED but my account is still showing unrated
rating update takes time
ThankYou For The Information
Problem F can be solved in $$$O(n+q)$$$: 329562348.
When I first thought of the problem, I thought: oh, just use sqrt decomposition (heavy-light partitioning). But then, I thought: Why was the graph being a tree? I realized there's a much simpler solution that exploits this constraint.
Nice contest. Thank you authors
E was a shitty problem
First live contest this year, editorial taking longer than usual... I miss super-fast editorials :=(
主题:申诉 Codeforces Round 1037 (Div. 3) 被标记 Unrated 管理员您好: 在 Codeforces Round 1037 (Div. 3) 中,我的提交被判为 Unrated。根据官方 FAQ,轻度 AI 辅助(如润色、重构)是允许的,我在此说明: 所有题目的算法思路均为原创。 以 F 题为例:我自行设计「按节点度数分类,小度数暴力、大度数 map」的做法。 AI 仅用于润色我已写好的代码(变量命名、缩进、注释),无任何逻辑复制。 我已核对最终代码,确保无公开模板逐字重合。 恳请复核,将该场比赛恢复 Rated。如需进一步信息,我乐意配合。 感谢!
Subject: Appeal for Unrated Contest Codeforces Round 1037 (Div. 3) Hi Codeforces team, My submission in Codeforces Round 1037 (Div. 3) was marked Unrated. Per the official FAQ, light AI assistance (styling, refactoring) is allowed. Here are the facts: All algorithms are my own. Such as problem F, I personally devised the “degree-splitting + brute-force for low-degree vertices + map for high-degree vertices” approach. AI was used only to polish my own draft code (renaming, formatting, comments); no logic was copied. I have double-checked the final code and confirm it does not match any public template verbatim. Please review and restore the Rated status. I’m happy to provide any extra details. Thank you!
关于我为什么要用AI润色代码,因为我要给学弟学妹解释代码是什么意思,我自己写的代码风格不太好阅读,所以我需要用AI在不改变代码逻辑的情况下让代码更适合新手阅读。我保证所有题目的算法思路都是我自己想的。请求恢复rated,感激不尽!
Regarding why I used AI to polish my code: I need to explain the code to my junior classmates, but my original style is hard to read. Therefore, I used AI solely to make the code more beginner-friendly without altering its logic. I guarantee that the algorithmic ideas for every problem are entirely my own. I sincerely request that this submission be reinstated as rated. Thank you very much!
Sir your code isn't skipped and why are you exposing yourself that you are using AI in contest?????
did rating not update or did i register unrated?
Hi guys, can anyone please tell me when will my rating appear
How do you do G man I don't understand
My submission of 'B' got TLE on test case 7 in system testing. I think, at least the first 10 test cases should be capable enough to reject a submission during contest... I am feeling so saaad...
And its joever, TLE on C during system testing, yeah -ve delta for sure.
Edit : D as well yeah I am cooked.
I submitted a, b & c solutions and all of those got accepted without a fail, but know during testing i see only first problem is showing as accepted and second question time limit exceeded and third question is not even showing . Can anyone tell me the possible reason?
All the questions go through system testing according to the time they were submitted in the contest. Your last question might not have been tested yet as the system testing is still not completed. Wait till it finishes you will see the final verdict on all your questions
is system testing always this long
Nahh this is insane, idk what's going on (it's taking too much time).
How long does the system testing usually take? It has been 7 hrs...
i dunno about exact time of testing, but i can assure u it doesn't take this long.
i think its around 3 hours more its done cuz it changed like 2% the last hour
How weak the pretest is?
Successfully solved the problem D during the contest , verdict was accepted and also on problem dashboard the colour of the problem was green .
But as now I visited the page verdict is in queue and also the colour of the problem is red.
What can I do regarding this !!!
System testing is in progress. Once it’s complete and your code passes all test cases, the status will be updated from queue to AC (During the contest, submissions are tested on pretests. After the contest, they are evaluated on the full set of test cases, since hacking was allowed in this round, your code will also be tested against any newly added successful hack test cases)
WTF IS TEST 51 IN F?????
im never doing a d3 or edu ever again... i get fst literally every time for the dumbest reasons, i mean cmon you couldve EASILY put a case in e to stop that
why the my solution for the E is skipped??
Maybe because it's too obvious you cheated?
using two accounts is wrong!!
That is what called cheating. you avoided your WA in 2nd account. And, used same soln. Don't use multiple accounts for a single contest.
What is you did is a plain CHEATING.
getting plag- is obvious._
Multiaccounting to avoid penalty is 100% considered cheating, cheating doesn't just mean taking solutions from other people / LLMs
No matter how much deny. What about those people who solved in one go. While you made mistakes in one account. And used other account to submit final soln.
Proper Misconduct behavior. This is regarded as CHEATING.
Using multiple accounts in a rated contest is against Codeforces policy. See Mike's blog on this matter.
Using an alt account is a form of cheating — you should have read the rules more carefully. Also, you tried to evade penalties by submitting with your alt account first, which is not allowed either.
yeah, i should accept the fact that getting penalties is not wrong.
And what do you say about your AI Generated looking like codes in DE with AI Generated looking like inline comments? Which are totally different from your codes to AB?
as i said i make changes.for that i use chatgpt for saving time.
That's also against the rule.
yes. I am getting it. Probably i have to be 100% loyal to myself.
The number of hacks in F and G are crazy in this contest.
interested to know the normal solution to problem E (I just wrote a greedy algorithm for 3 checks and got AC lol)
Fucking Weak Pretest(s) !!! So sad...
When will the ratings get updated?
The rating is officially updated only after the system testing is complete. In most cases, it takes usually a few hours, though occasionally it can take up to a day.
but 25 hours already passed
Sorry, the expected waiting time I said for rating updates is from 'after system testing is complete,' not from 'after the contest ends'.
my ranking showing 17000 around solved 2 questions will i get any rating for the contest it is still showing unrated. will i get any rating for the contest i had participated first time in codeforces contest
Ratings are not updated yet for all participants, will be updated soon. The 'unrated' text you're seeing doesn't necessarily mean the contest is unrated for you. That text also appears when ratings simply haven't been updated yet.
i guess i will go to sleep and hopefully see myself green tomorrow ;-;
never mind. hooray!! :D
i got just +6 :(
keep grinding friend :D good luck. I really looked forward to this, the day-long system testing did get me mood down a little
yayy, i got back green as well. Disappointing downfall I had :(
why my rating has not come yet?
Can anyone help me to debug my submission for F, I am getting TLE at 41th testcase.
Don't know what is getting wrong.
editorial when?
At last, after so much grinding, my name is GREEN for the first time. I'm not fully confident yet, but this definitely motivated me to keep working even harder.
a good contest, thanks for the author.
insanely weak pretests for B
come on dropped from like 2k rank to 6k
exactly dude it dropped my rank significantly too !
Still no tutorial?
where is the editorial?
could anyone explain how this brute force is passing for B https://mirror.codeforces.com/contest/2126/submission/329663126
For the B problem https://mirror.codeforces.com/contest/2126/problem/B why is this code not correct ? ~~~~~
include
include
include
using namespace std; int main(){
} ~~~~~~
First, if the current i isn't right, you have to increment the i with 1 only, but you don't do this in the condition (when doing cnt++ you should increase i with k + 1 else you should increment it only 1)
Second, you will get TLE because imagine that the sequence is k — 1 zeros and 1, and the sequence goes with this pattern, so you need to use binary search to know the next index of 1.
During the contest, I solved problem D, but to be honest, I just somehow guessed the solution because it seemed that the problem was very similar to some classic greedy problem.
I just experimented with how to sort the intervals. Initially, I sorted the array as I did in the classic problem, by the right side of the interval, and I found that the solution was wrong. So I just changed that to sort based on 'real' instead, and the solution passed, but I didn't understand why it worked.
Can someone explain how to approach these types of problems more systematically? How do you usually prove greedy solutions instead of just guessing?
I initially doubted that greedy works too, but with the constraint l <= real <= r I couldnt see any case it fails, so I just coded it anyway.
I thought the only case it could go wrong is when we kind of fail to pick the biggest coin later on for just greedily taking coins, but that could be tackled by storing all coins you got along the way, so I could just implement that later if necessary
This is not difficult. This has nothing to do with the size of the right boundary. Let’s assume the number of current coins is x. We can perform the operation when l≤x≤r. We certainly want our number of coins to increase, so this is related to the value of real. When real>x, performing the operation will definitely lead to a better outcome.
can you tell me what's wrong in problem https://mirror.codeforces.com/contest/2126/problem/E
When will the editorial come?
Problem D:
This type of codes are accepted. But I think in case of following type of test cases these codes give wrong answer.
Please correct me if I am wrong as I am newbie.
when will the toturial come out?
On problem F
I got the memory limit exceeded because of creating array 2D with size O(N * sqrt(N)) and for each elements got long long int.
After that, I increase the BLOCK size to 1000, still MLE, and 2000 then got accepted.
Toturial?
Guys, editorial is here — Editorial
I think authors just forgot to add the link on the contest page with announcement
Appeal Regarding Plagiarism Flag – Submission 329450287 (Problem 2126C)
Hello,
I received a plagiarism warning for my submission 329450287 for problem "I Will Definitely Make It". I want to clarify that I solved the problem independently and did not share my code with anyone, nor did I copy it from any external source.
My solution is based on my own understanding and implementation style, which may resemble others because:
The problem has a relatively standard approach, leading to similar logic among participants.
I use a personal template (macros like pb, all, etc.), which might be common among competitive programmers.
I kindly request you to review my case. I am willing to provide my thought process if required.
Thank you for your time and consideration.
Regards, Bisal Prasad (bisal2003)
Hello Codeforces Team,
I’ve received a plagiarism notification regarding my submission for Problem D in Round 1037 (Div. 3). I want to clarify that the solution was completely written by me, and I haven’t copied from anywhere or taken help from anyone.
I don't know how it is happened.I use struct,just because I didn't know about tuple back then.And I used priority_queue just because I couldn't solve in other ways.Using multiple approaces I couldn't even pass the example testcase as I couldn't implemented my idea,that is why I used priority_queue,and it worked.Then I thought if I put all the Real (here in my code which is r) based on l less than equal to current ans,which is initialized by k.After that if I pop the elements less than or equal to current ans,I can get the maximum current ans.That's why I tried this,and got AC.
Now I got this message,I don't know what should I do.I think it's a conincidence. I never face this before.So,I don't know what should I write here. I just can say it's maybe a coincidence from my side,please approve this. I don't know when will you review it.I write the code by my own.This code based on my idea.I always participate fairly in contests and never copied code. Even if you look the code,When I read the problem statement,it was l[i],Real[i],r[i] in this sequence,which I thought mistakenly,as am in time pressure during contest.So I made my custom ds by using struct in this sequence. But I couldn't even passed the example test case.Then I find out I took input in the wrong order which should be l[i],r[i],Real[i].But as it is in contest and time matters,thats why I didn't change the sequence and used r as Real and used Real as r.And my idea was clear to myself.I just came to know that my code matches to others.I don't know how.It's a coincidence maybe.They did this approach also.Here What's my fault?I don't even know.It will be very hurtful,if my submission got skipped.Please review it. And I never used ide.one,I use vscode always. I don't know is it enough to clarify it.But I hope my message can clarify the situation. I am fully aware of the importance of fair participation, and I always code alone during contests. And I assure you I’ve always followed fair practices. I hope you’ll consider my clarification.
Hello Codeforces team,
I’ve received the notification regarding the coincidence of my solution to problem 2126D (submission ID: 329462957) with several others. I want to clarify that I wrote my solution independently during the contest and did not participate in any form of code sharing or collaboration.
I think this happened because i have given struct name "casino" , and priority_queue as "pq" , which is very common, I think it's just a coincidence
or maybe If this overlap has occurred due to the use of a public or common source that I was unaware of being shared during or before the contest, I sincerely apologize. I understand the importance of fair play and contest integrity and will be more careful in the future, including avoiding any platforms that might unintentionally expose my solutions.
Please let me know if any further information is required from my side. I respect the platform and its rules, and I hope this issue can be resolved.
Thank you for your understanding.
Hello, I had registered for this contest and did not tick the "Unrated" option, but it is showing as unrated for me.
My handle: Amit_2700
Could you please check if my rating update was skipped? Thank you.