AmShZ's blog

By AmShZ, 8 months ago,

Hi Codeforces!

Keshi, alireza_kaviani and I are delighted to invite you to participate in Codeforces Round #800 (Div. 1) and Codeforces Round #800 (Div. 2).

• Start time: Jun/16/2022 17:35 (Moscow time)
• Duration: $120$ minutes
• Number of Tasks: $6$ for both divisions
• Rated range: ($-\infty$,$1899$] for Div2, [$1900$, $\infty$) for Div1

We are honored to have set the 800th Codeforces round. We wish this wonderful platform all the best along with many other exciting rounds.

Huge thanks to the following people:

Thanks to NEAR for supporting this round, details can be found in this post.

We have worked hard to keep the statements clean and the pretests strong!

Please read all of the problems and their notes, enjoy your time and solve as many as you can! Good luck have fun to everyone!

The scoring distributions will be announced later.

UPD: Here are the scoring distributions:

• Div. 1: 750 1000 1500 2250 2500 3000

• Div. 2: 500 1000 1500 1750 2250 3000

UPD: Editorial is out!

• +796

 » 8 months ago, # |   +61 Great contest! you will enjoy it.
•  » » 8 months ago, # ^ |   -14 BitmaskForces ?
•  » » 8 months ago, # ^ | ← Rev. 2 →   -37 Good luck everyone...Hope everyone performs well :)
•  » » 8 months ago, # ^ | ← Rev. 2 →   -35 lol .. He said Huge thanks to testers for providing invaluable feedback.If you dont believe me scroll and check.
•  » » » 8 months ago, # ^ |   +6 invaluable != not valuable
•  » » » 8 months ago, # ^ |   +14 invaluable is actually of stronger positive meaning than valuable, its easier when u understand it as "unable to be valued as it is too precious to be"
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 i did'nt know ThankYou
•  » » » » » 8 months ago, # ^ |   -9 don't use past tense with did not, i also did earlier, SAY i did'nt know
•  » » » » » » 8 months ago, # ^ |   0 ok sir.
•  » » » » » » » 8 months ago, # ^ |   +5 Thank me later :)
•  » » » » » » » » 8 months ago, # ^ |   -14 i think i dont need to.
•  » » » » » » » » » 8 months ago, # ^ |   +9 You do, kindly
 » 8 months ago, # |   -9 Orz
•  » » 8 months ago, # ^ |   -12 Orz
•  » » » 8 months ago, # ^ |   -8 Orz
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 F
•  » » » » » 8 months ago, # ^ |   -10 Orz
•  » » » » » » 8 months ago, # ^ | ← Rev. 2 →   -38 [Deleted]
•  » » » » » » » 8 months ago, # ^ |   +14 ratio
•  » » » » » » » » 8 months ago, # ^ |   -13 Orz
•  » » » » » » » » » 8 months ago, # ^ |   -17 Orz
•  » » » » » » » » » 8 months ago, # ^ |   -19 orz
•  » » » » » » » » » 8 months ago, # ^ |   +138
•  » » » » » » » » » 8 months ago, # ^ |   0 oml how far is this going
•  » » » » » » » » » 8 months ago, # ^ |   +5 Can't go anymore :( HintThe debates reached maximal permitted depth, so your message and the message you are replying will be displayed on the same level.
•  » » 8 months ago, # ^ |   -12 Orz
 » 8 months ago, # |   +11 Yet another great Iranian round :) orz
•  » » 8 months ago, # ^ |   0 Orz
 » 8 months ago, # |   +29 Hope everyone can be red in this contest (of course include me).
 » 8 months ago, # |   +63 btw congrats to alireza_kaviani for qualifying in Iran's IOI 2022 team
•  » » 8 months ago, # ^ |   +20 Manchester is RED , alireza_kaviani :) orz
•  » » » 8 months ago, # ^ |   -9 Manchester is Blue
 » 8 months ago, # |   +23 Codeforces orzMikeMirzayanov orzPolygon orz
 » 8 months ago, # |   +17 Orz
•  » » 8 months ago, # ^ |   -15 Orz
•  » » » 8 months ago, # ^ |   -15 Orz
•  » » » » 8 months ago, # ^ |   -7 Orz
•  » » » » » 8 months ago, # ^ |   -9 ORZ
•  » » » » » » 8 months ago, # ^ |   -20 orz
•  » » » » » » » 8 months ago, # ^ | ← Rev. 3 →   -44 OrzEdited: Sorry no orz no orz !
•  » » » » » » » » 8 months ago, # ^ |   -51 Orz
•  » » » » » » » » » 8 months ago, # ^ |   -40 Orz
•  » » » » » » » » » 8 months ago, # ^ |   -31 Orz
•  » » » » » » » » » 8 months ago, # ^ |   -15 Noo orz!
• »
»
8 months ago, # ^ |
Rev. 2   -8

stO Orz

 » 8 months ago, # |   +15 Paranoid creepy tasks?
•  » » 8 months ago, # ^ |   +36 Don't worry, no surprises.
•  » » » 8 months ago, # ^ |   -21 Don't worry, there will be no more than $10^9+7$ suprises.
•  » » » » 8 months ago, # ^ |   -8 You don't belong here
•  » » » » » 8 months ago, # ^ |   -22 You don't belong there
•  » » » » » » 8 months ago, # ^ |   -19 orz
 » 8 months ago, # |   +64 As a tester, problems are great and statements are short.I encourage you to participate in this round! You will definitely enjoy this round!
•  » » 8 months ago, # ^ |   +1 Haha certainly....but sometimes short ones are the real fire ones...looking forward for this round....
 » 8 months ago, # | ← Rev. 3 →   +7 Where is translation into russian?
 » 8 months ago, # |   +15 Another div1 with trygub support? It will be fine.
 » 8 months ago, # |   +3 Hope all the best for everyone
 » 8 months ago, # |   +50 Finally, my first Div 1 contest. Yayyyy. Every time I used to fall back to expert just before Div 1 contests.
•  » » 8 months ago, # ^ |   +6 Have seen you somewhere ... anyways best of luck...
 » 8 months ago, # |   +13 Good luck for everyone!!!
 » 8 months ago, # |   +10 good luck for everyone
 » 8 months ago, # | ← Rev. 4 →   -29 good luck man!
•  » » 8 months ago, # ^ | ← Rev. 2 →   -11 ok thx
•  » » » 8 months ago, # ^ |   -35 Um_nik orz
 » 8 months ago, # | ← Rev. 4 →   0 Good luck !?Naah,it won't help :(
 » 8 months ago, # |   +9 800th round! A great number
 » 8 months ago, # |   0 WOW! We have crossed 700. ٩ (◕‿◕｡) ۶
 » 8 months ago, # | ← Rev. 4 →   -17 No hacking ??
 » 8 months ago, # |   -13 All the best everyone!
 » 8 months ago, # |   +8 My first time participating in Div. 1, I am so nervous.
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 Good luck
•  » » 8 months ago, # ^ |   0 how you became expert in your first contest itself??
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 I thought the base score was 1,500, and I got +167 in my first contest.
 » 8 months ago, # |   0 Wow, great!! 800 contests, its huge!! Thank you Codeforces❤️
 » 8 months ago, # |   0 We hope that 800th Codeforces round will be more interesting for all of us.
 » 8 months ago, # |   0 Hope for the +ve delta in this round
 » 8 months ago, # |   -13 Will this contest be rated?
•  » » 8 months ago, # ^ |   0 Rated range: (−∞,1899] for Div2, [1900, ∞) for Div1
 » 8 months ago, # |   +8 I know I won't be able to solve any one of em, still gonna participate..
•  » » 8 months ago, # ^ |   +2 That's the spirit! Wish you the most of luck! <3
•  » » » 8 months ago, # ^ |   0 Thanks, I appreciate your kindness.
•  » » 8 months ago, # ^ |   0 Yes you are noob
•  » » » 8 months ago, # ^ |   +31 No stool, Sherlock!
•  » » » 8 months ago, # ^ |   0 And you are an LGM?
•  » » » » 8 months ago, # ^ |   -11 And you are tourist?
 » 8 months ago, # |   0 GAP
 » 8 months ago, # |   +2 Hope I don't go back to being a pupil :/
•  » » 8 months ago, # ^ |   0 Same TOT
 » 8 months ago, # | ← Rev. 2 →   +69 When someone says orz as a comment
•  » » 8 months ago, # ^ |   -11 orz
 » 8 months ago, # |   0 tell newbie what is orz
•  » » 8 months ago, # ^ |   +27
•  » » » 8 months ago, # ^ |   -12 mean move
•  » » 8 months ago, # ^ |   0 Orz(or more commonly, orz)is an emoticon that represents someone who has fallen over or is bowing down on their knees and perhaps pounding their head on the floor. and moreThe o is the head, the r is the arms and upper torso, and the z is the rest of the body and legs.
•  » » » 8 months ago, # ^ | ← Rev. 8 →   0 orz (thank u)
 » 8 months ago, # |   +8 is it contest?
•  » » 8 months ago, # ^ |   +3 No, it's a twin contest.
•  » » 8 months ago, # ^ |   0 no, it is rated.
 » 8 months ago, # |   -10 orz
 » 8 months ago, # |   -32 Benq When are we seeing you in the action?
 » 8 months ago, # |   +33 I guarantee you will enjoy the contest.
 » 8 months ago, # | ← Rev. 3 →   -26 nice
 » 8 months ago, # |   +23 I hope I don't lose points in this game.
•  » » 8 months ago, # ^ |   +3 I thought so too.
•  » » » 8 months ago, # ^ |   +2 I thought so too too.
•  » » 8 months ago, # ^ |   0 I hope so too.
 » 8 months ago, # |   +33 No offence but why does authors tend to hide the score distribution and reveal it just before the contest starts? strategy?is there a hidden strategy out there?(⊙⊙)(☉_☉)(⊙⊙)
 » 8 months ago, # |   0 Lmao, what does +inf & -inf rating mean !!
•  » » 8 months ago, # ^ |   +1 infinity, quite literally. If you did not know, negative ratings exist and they are not rated in most rounds (most rounds' rated range begin from 0)
 » 8 months ago, # | ← Rev. 2 →   +6 [1900, tourist] for Div1* :v
•  » » 8 months ago, # ^ | ← Rev. 2 →   +50 It should be [1900, tourist].
•  » » » 8 months ago, # ^ |   +4 That time tourist didn't registered.. now registered.
•  » » 8 months ago, # ^ |   +18 Orz to people that have actually seen his handle fully red
 » 8 months ago, # |   0 I hope that this contest is nice for all.
 » 8 months ago, # | ← Rev. 2 →   0 I hope we get to the max rating after this round ^_^
 » 8 months ago, # | ← Rev. 2 →   0 Good luck for everyone!!!
 » 8 months ago, # |   -8 Why only two div2 testers?
 » 8 months ago, # | ← Rev. 4 →   0 Eight 100!!!
 » 8 months ago, # |   +65
•  » » 8 months ago, # ^ |   +75 :)
•  » » » 8 months ago, # ^ |   0 Know this guy? SpoilerAnd his name is Jauun Cenaaa...
 » 8 months ago, # |   +3 Why so many orz comments? Could someone explain, please?
•  » » 8 months ago, # ^ |   +7 A Hieroglyph.
 » 8 months ago, # |   +5 RIP Score distributions.
 » 8 months ago, # |   +4 When will be the score distribution update? It's just 1 hour 12 minute remaining.
 » 8 months ago, # |   +15 waiting for score distribution be like
 » 8 months ago, # |   +4 My first contest!!
 » 8 months ago, # |   +1 Not a Doctor Still doing a lot of operations.Won't say bad round. I liked the Problems though.
 » 8 months ago, # | ← Rev. 2 →   -54 I think that this contest isn't good. I can't understand the problems well.
•  » » 8 months ago, # ^ |   -14 Why so many downvotes !? It's my personal opinion !
•  » » » 8 months ago, # ^ |   +9 Because people didn't like your opinion. I mean that is how this system works. If people don't like your opinion they downvote you. if they like it then they upvote you.
•  » » 8 months ago, # ^ |   -6 I agree with your opinion!
 » 8 months ago, # |   +12 If this was a Div2 I am a refrigerator. tf.
 » 8 months ago, # |   0 I don't mind difficult problems but a,b,c are very observation based and took me a lot of time, hence we don't get enough time for interesting problems like D
 » 8 months ago, # |   +35 I dont like this round (my opinion)
•  » » 8 months ago, # ^ |   0 I respect the work of autors. Its very cool to do problems for codeforces round. I dont like this types problem. Thats what I meant.
 » 8 months ago, # |   +2 I guess I am just dumb.
 » 8 months ago, # |   +10 Round #800 CLASSIC GREEDY ONE !!!!!!
 » 8 months ago, # |   +6 I didn't expect adhoc tasks :(
 » 8 months ago, # |   +12 I liked problem C. Sample cases were very useful for solving.
•  » » 8 months ago, # ^ |   0 I hated it for that reason, but problem was very good . They should'n have provided the 5th sample it was easy to guess then.
 » 8 months ago, # |   -30 The comment is hidden because of too negative feedback, click here to view it
•  » » 8 months ago, # ^ |   0 That's kinda funny tbf
 » 8 months ago, # |   +37 How to solve Div 1C?
•  » » 8 months ago, # ^ | ← Rev. 4 →   +25 Reverse the graph and then do something very similar to dijstrak starting from n-1. Notice that at some node, you have a bunch of nodes you can go to and if you know their distances, you can kill some in descending order(so like their effective distance is +0 +1, +2 +3....) and find the optimum of that. Thus, what you can do is to store the current estimates incoming (after reversing) for each node and pick the best (similar to dijstrak) after adding some weights. Then, we process the nodes by current estimate similar to dijstrak. But this may potentially force you to reupdate the whole set everytime you process a node. But, you realise that you only add numbers greater than numbers you add before (since you process nodes in ascending estimates). So, you can just store the best estimate.Essentially its just do dijstrak with the following modification: dist[v] = min(dist[v], dist[u] + indeg[v]) indeg[v]-- SpoilerI still cant really prove why this would be entirely correct though.
 » 8 months ago, # | ← Rev. 2 →   +18 For problem D: if the sequence is decinc, there are only at most $3$ representations of it, that are of interest. For maximum increasing subsequence, you must use all elements except maybe one and if you don't use an element in the increasing sequence, it's always either first or last element.Note that if the sequence is decinc, then so is all of its subsequences, hence you could kind of make a binary search for each $L$ on the largest $R$ such that $[L; R)$ is decinc.But my solution failed pretests because it uses binary lifting and needs $O(n \log n)$ memory. I'm pissed off it doesn't pass.Now that I think of it, you can probably also do it in $O(n)$ with two pointers?
 » 8 months ago, # |   +58 I've seen a version of Div1D with answering for whole sequence in a few Polish competitions, so the key observation (that we can build the answer greedily) was known to me (I'm not saying that the rest is correct, last rounds weren't generous for me).
•  » » 8 months ago, # ^ |   +65 I can write a bit more: assume that we've split the prefix into two sequences (decreasing and increasing) and the next two elements are $x$ and $y$, where $x$ can be appended both to increasing and to decreasing sequence. It turns out, that if $xy$, it's optimal to append $x$ to decreasing one.
 » 8 months ago, # |   0 Approach for Div2C??
•  » » 8 months ago, # ^ |   +1 Beginning from last non-zero element, iterating backwards, keep adding arr[i], sum must never be >=0, except at Oth element. That was the opeartion about.
•  » » » 8 months ago, # ^ |   0 i was iterating from backwards and decreasing the current element say a[j](initial array) by k such that it gets equal to m[j](given array) and adding k-1 to a[j-1] lastly i check that array is equal or not alongwith my pointer is on the first element or not this approach is giving wrong answer
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 note that last non-zero element can't be negative, but your approach may give Yes.
•  » » » » 8 months ago, # ^ |   0 160850010. I did the same thing. This might help
•  » » » » » 8 months ago, # ^ |   +3 Extremely thankful!
•  » » 8 months ago, # ^ |   +1 let j = position of last non-zero number (1-indexed)There must be no prefix sum of length i(0
 » 8 months ago, # |   +24 Div2B was hard -_-
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 maybe you are just paranoid
 » 8 months ago, # | ← Rev. 2 →   0 Can anyone make me understand the div2 problem A statement , please, I am really confused how the define prefix here and minimum possible creepiness
•  » » 8 months ago, # ^ |   0 Yeah problem statement was not clear But prefix means abs(count(1s) — count(0s)) till that index eg: 0 1 0 0 1 pref 0 -> has 1 0s and 0 1s so its abs(1-0) — 0 Similarly till 1 to 4 i.e index 0 to 3 more formally 1's count = 1 and 0s count =3 so absdiff = (1-3) = 2 But since we need to minimize creepiness we need to do alternate 1s and 0s so they can cancel each other at certain prefix and abs diff = 0
•  » » 8 months ago, # ^ |   0 for every prefix there will be a creepiness. out of all the creepiness of every prefix, we will have to take the maximum creepiness. now this maximum creepiness should be minimum.form the testcase a=3 and b=7. this means there are 3 0's and 7 1'sthere can be multiple answer to this, but lets take the testcase answer: 0001111now the prefixes for there are: (beside them i will write the creepiness(c)) [c= abs(a-b)]0 : a=1, b=0, c=1 00 : a=2, b=0, c=2 000 : a=3, b=0, c=3 0001 : a=3, b=1, c=2 00011 : a=3, b=2, c=1 000111 : a=3, b=3, c=0 0001111 : a=3, b=4, c=1out of all the prefixes, the max creepiness is 3.in this example, no matter how you arrange the 0's and 1's, you maximum creepiness will never be less than 3.but this not how you should arrange your 0 and 1. You should first alternatively arrange them and then if there are some left from either just 1 or 0, just print all the remaining of them.
 » 8 months ago, # |   +3 I'll suffer from PTSD from now on for string problems :(
•  » » 8 months ago, # ^ |   +5 Post Traumatic String Disorder
 » 8 months ago, # |   +17 what's the solution for div1A? I have no idea why I got AC
•  » » 8 months ago, # ^ | ← Rev. 2 →   +3 Hey, Can I ask you, As a div 1 participant how was Div1B?
•  » » » 8 months ago, # ^ |   +12 actually pretty simple problem on dp on trees
•  » » » » 8 months ago, # ^ |   +3 Can you please explain your solution, or suggest some similar dp on trees problems.
•  » » 8 months ago, # ^ | ← Rev. 2 →   +5 I don't know if i am eligible to explain something to CM, but this is how I solved. First I observed that if the first element = x, then we go right x times from first element. If we go x times right from first then we must go left x times from second element. since the second element = a[1] = ( number of rights from second — number of lefts from second). So we get right_times[1] = a[1] + x. Similary construct for all indices. If any of them is negative then its not possible since we cant go negative number of times in some direction. This is my code PS: We also need to check if at some point right[i] becomes zero then all the array elements from that index must be zero, since we dont move towards right anymore.
•  » » » 8 months ago, # ^ |   +11 oh, I understood, thanks! not bad problem though
 » 8 months ago, # |   0 tox1c_kid got trolled
 » 8 months ago, # | ← Rev. 2 →   0 It's funny that I solved C faster than B and solved B faster than A :D
 » 8 months ago, # | ← Rev. 4 →   0 first time solving A,B,C and D, even though I toke 14 mins in problem A, I hope I get specialist.
 » 8 months ago, # | ← Rev. 2 →   0 Do you have a small test case that fails this simple and wrong solution for 1E? For each element, count how distinct values on the left that the smaller than the element For each element, count how distinct values on the right that the smaller than the element Take the sum of the minimum of the two counts for each element
•  » » 8 months ago, # ^ |   +8 I also had the same idea, but here is the problem: It might be better to take the right maximum and then the left maximum afterwards.test case:54 3 5 1 2The min for 4, 3, 1, 2 is clearly 1. But the min for the 5 would be 3. However, we can take right maximum and then left: 5 -> 2 -> 0. So answer is actually 1+1+2+1+1 = 6 instead of 7.
 » 8 months ago, # |   0 My C shouldn't have passed... caught the countercase too late though, so FST likely.B... doable, but I forgot I was counting bad spans which can just extend to the beginning because they're already bad.
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 edit: facepalm for not knowing how my solve was correct...
 » 8 months ago, # |   +172 1693C - Keshi in Search of AmShZ is the problem of the year.
•  » » 8 months ago, # ^ |   +39 Disagree, C was standard imo, for example 102341H - Hypno is very similar, but a bit harder. D, E and F were rather nice, a bit of AtCoderForces spirit, but still way better than most AGCs.
•  » » » 8 months ago, # ^ |   +29 My bad, I had never seen anything similar to C.
•  » » » » 8 months ago, # ^ |   +49 Nope, not your bad, it's just your opinion versus mine. The fact that for you it was good and interesting can only be a plus for the problem. :P
•  » » » » » 8 months ago, # ^ |   +73 Character Development.
•  » » » 8 months ago, # ^ |   +26 wow, it's an honor.
 » 8 months ago, # |   +20 Problems were interesting.
 » 8 months ago, # | ← Rev. 4 →   0 So hard..... I can not solve (Div 1. C)1693C - Keshi in Search of AmShZ, I thought topological sorting + DP may work, but what if the graph has a loop and is not a DAG?
•  » » 8 months ago, # ^ | ← Rev. 4 →   0 you run a djikstra-like algorithm on the reversed graph. In each iteration, my solution has an invariant that the nodes that have been popped from the set have the smallest values of $dp[u]$, where $dp[u]$ is the minimal cost required if one starts from node $u$ and goes to node $n$. We remove edges only when we are at the node from which the edge emanates (goes out). Then you can see how a djikstra-like algorithm always maintains this invariant, and hence answer is $dp[1]$.details: 160892338
•  » » » 8 months ago, # ^ |   -6 I appreciate it, I think I do not understand the idea of djikstra totally, it is time to take my DS book up again.Sadly, I may get a down rank.
 » 8 months ago, # | ← Rev. 2 →   +62 D1C is amazing and suitable for commemorable 800th round, thanks! hintTry dijkstra. This is the largest hint.
 » 8 months ago, # |   0 I hope to reach expert next round :( :(
 » 8 months ago, # |   +37 rainboy orz on astonishing participation! He won't become a GM after this contest but he really deserved it. This strategy of solving the problems starting with the harder ones is really not that bad, especially for educational purposes.
•  » » 8 months ago, # ^ | ← Rev. 2 →   +8 chadboy
 » 8 months ago, # |   +11 The best round recently I think! Thank the author!
 » 8 months ago, # |   +12 small feedback: A is kinda cool, B&C both too standart IMO
 » 8 months ago, # |   +9 Not sure about the complexity of "dive" function in my solution to D: 160848374. If anybody wants to try to create the test were the complexity is worse, you're welcome (don't know if it's correct or not).
•  » » 8 months ago, # ^ |   +10 I think I did the same thing, guessing that it would work (somehow it did). I would also like to see a proof of why this type of memoization runs in linear time.
•  » » » 8 months ago, # ^ |   0 Yeah. I’m doing more stuff, but I can believe that the transition is correct.
 » 8 months ago, # | ← Rev. 2 →   0 I am able to solve only problem A.
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 Glad to see your persistence, try our best to prepare for the next round!
•  » » 8 months ago, # ^ |   0 try upsolving at least B before looking at solution, its not difficult. I always try to solve at least one more problem after the contest
•  » » » 8 months ago, # ^ |   0 I am able to solve b but in contest unable to solve it.
 » 8 months ago, # | ← Rev. 3 →   -11 UPD: why downvotes ? I simply removed my original post
 » 8 months ago, # |   0 div 2 B was little tricky compared to c may be c should have been swapped with b
•  » » 7 months ago, # ^ |   0 I still didn't get why for third example case, namely string "100" the answer is 4. I can get 5 paranoid strings: 100 itself is paranoid, you can first collapse $f(100, [S_1,S_2]) \to 10$ $f(10, [S_1,S_2]) \to 0$ Also with same logic 10 is paranoid too $+$ three single-char substrings "1", "0", "0" But correct answer is 4. Where I'm wrong?
•  » » » 7 months ago, # ^ |   0 100 is not a paranoid , because we cannot convert 100 to a either 0 or 1 as given in question we have 2 types of operation 1. any substring 10 can be converted to 0 2. any substring 01 can be converted to 1 so f(100, [s1, s2] ) would be -> 00 by operation 1 and now we cannot do any operation at 00
 » 8 months ago, # |   0 is "wrong answer jury had better answer" different from "wrong answer expected ,found"?
•  » » 8 months ago, # ^ |   0 It's 2 different types of problems: "jury" thingy appears where you have to calculate a minimum or maximum answer for example and at some point there is a possibility to have a better answer than yours, but "expected" simply stands for a wrong answer.
 » 8 months ago, # |   0 Thanks for the round, Div1 pC was really interesting!
 » 8 months ago, # |   0 What was the sol for Div2 C?
•  » » 8 months ago, # ^ |   0 start from right most and think of total left and right moves to get desired, and compare with the first value
•  » » 8 months ago, # ^ |   +10 I solved this problem using RBS (Regular Bracket Sequence) pattern. If you consider the positive numbers as the number of open brackets and the negative numbers as the number of closing brackets, you will see "If the total sequence is regular and it's closed then the answer is yes".So you will get Yes for ( ()()() ) or ((())) or ( ( () ((())) ) ). But if the bracket is like this ()()() then it's no because in this case you can't get back to the first index.
•  » » » 8 months ago, # ^ |   +4 oh boi!! you're a genius
•  » » » 8 months ago, # ^ |   +3 Wow, Your analogy is interesting. This is a different way to think of problem.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   +3 this is really a great intuitive way to see things! Thanks for sharing it
•  » » 8 months ago, # ^ |   0 If at any index < last index prefix sum is <= 0 || total sum != 0 then ans is nohere last index is index of last non zero element.Take care of few edge cases such as all zero elements
 » 8 months ago, # |   +3 Great contest. The problemset was amazing and so fun to solve. Enjoyed this contest so much.
 » 8 months ago, # |   +10 I think the problem setter is a Radiohead fan. Some of the problem title is similar to Radiohead's song title . Or its just a coincidence .
•  » » 8 months ago, # ^ |   0 Yeah it says in the announcement.
•  » » » 8 months ago, # ^ |   0 oops i missed that.
 » 8 months ago, # |   +9 very good and balanced round + interesting problems. Though I FSTed on div2c but was a silly mistake. Overall thanks for the amazing round
•  » » 8 months ago, # ^ |   0 whats fst??
•  » » » 8 months ago, # ^ |   0 Failed System Testing
•  » » » » 8 months ago, # ^ |   0 good to know the lingos XD thanks
 » 8 months ago, # |   0 Enjoyable contest <3 ,, thanks author Fastest problem rating distribution .........
 » 8 months ago, # |   0 How to solve Div2 D problem?
•  » » 8 months ago, # ^ | ← Rev. 3 →   +7 do DFS on the tree.if the node children returned a number which is greater than or equal lv, just return the min of the returned value of the children and the rvif it is less than the lv, you need to make another operation to fix this issue, so you will increase sol by one, then you will need to return rv.
•  » » » 8 months ago, # ^ |   0 But how do you prove that the configurations doesn't matter?In the sense , say a node has value 5.. 5 can be written as [1,1,3] , [1,2,2] and so on. But in your solution , you just see the min(sum, Ri). Why does your solution work? Proof?
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   +1 I can't understand what you mean by configuration and why there are 3 numbers in your examples.I am not good at writing formal mathematical proofs, but I will try to proof it logically.The current node doesn't care how many nodes under it, it only cares about the maximum value they all need, because it is the maximum value I can give to the current node, I can decrease it if I want, but I cannot increase it without an additional operation.But notice that the sum of all the child nodes values may be greater than Rv, so I take the min of them
 » 8 months ago, # |   0 Can anyone tell the testcase for which my submission is failing (Div2C):- Submission
•  » » 8 months ago, # ^ |   0 You can use this app to get more samples (stress testing is not working for unknown reasons): https://cfstress.com/test/1694/c/
•  » » 8 months ago, # ^ |   0 logic is right, just use long instead of int for sum.
 » 8 months ago, # |   +8 luck maatters much in life
 » 8 months ago, # |   -7 Finally going to be pupil !!!
 » 8 months ago, # | ← Rev. 3 →   0 I want to prove that other than the similarity in the code in question A Also I got Ac before him/her in question B
 » 8 months ago, # |   0 can someone tell me why i got tle'd in this submission https://codeforces.com/contest/1694/submission/160921292 Thank you
•  » » 8 months ago, # ^ |   0 Pass vector>range by reference to dfs function, also use long long for sum
•  » » » 8 months ago, # ^ |   0 Thank you
 » 8 months ago, # | ← Rev. 2 →   0 For Problem A — Directional Increase , Can someone please check what edge case am i missing — https://codeforces.com/contest/1693/submission/161166279
•  » » 7 months ago, # ^ |   0 no try to debug yourself.
 » 4 months ago, # |   -20 Quality comments