### GreenGrape's blog

By GreenGrape, 8 months ago, translation, ,

Hello, Codeforces! Haven't seen ya for a while :D

Codeforces Round #461 will take place on Wednesday, 20:15 MSK. Note that the round is scheduled a bit later than usual.

The round will be rated for all division 2 participants. Division 1 is heartly welcome aswell :)

My gratitude to Kolya (KAN) for round coordination, Grisha (gritukan), Oleg (x3n), AmirReza (Arpa) and Senya (senek_k) for testing and Mike (MikeMirzayanov) for awesome Codeforces and Polygon. A special thanks goes to Dima (mitterr1999) and Camille (pseuda) for sharing a problem sketch with me.

The main character of this round will be Imp the playful monster. Yet the statements are guaranteed to be short :)

There will be six problems with the following scoring:
500 — 1000 — 1250 — 1500 — 2000 — 2750

GL & HF!

Note that the round has been moved 40 minutes later to avoid clashing with CSAcademy Round.

UPD. The contest is over. Well...

UPD. System testing is over! Editorial.

Congratz to the winners!

Div. 2:

Div. 1 (unofficial):

UPD. The complete editorial is out (D/F).

•
• +674
•

 » 8 months ago, # | ← Rev. 2 →   +44 Really loved your last round but hopefully this time, there will be a better difficulty distribution in the problems!
•  » » 8 months ago, # ^ |   +74 I tried to make it a bit more balanced this time :)
•  » » » 8 months ago, # ^ |   +45 I am still trying to solve your C up to this day.
•  » » » » 8 months ago, # ^ |   -38 How to download Test #15 of 650C Table Compression?
•  » » » 8 months ago, # ^ |   0 balanced such that b is easier than a
 » 8 months ago, # |   +2 codeforces contests are always great and amazing , i always try to attend the contests , but my bad , may be i will not be able to participate in this contest due to some travelling stuffs , and it is much painful for me , competitive programming is my passion
•  » » 8 months ago, # ^ |   -39 How to download Test #15 of 650C Table Compression?
 » 8 months ago, # |   +38 Ohh god CM problem setter again.
•  » » 8 months ago, # ^ |   +48
•  » » 8 months ago, # ^ |   -28 How to download Test #15 of 650C Table Compression?
•  » » » 8 months ago, # ^ |   +1 In input : 1000 1000 1002 1002 1002 1002..... (1000 times) In output : 1000 1000 1000 1000..... (1000 times) Coz you were asking so many times.
•  » » » » 8 months ago, # ^ |   +3 the other numbers must be n*m(1000*1000). And also if there is only 1002(1000*1000 times) the answer must be 1(1000*1000 times).
•  » » » » » 8 months ago, # ^ |   +7 oh but downloading the full test cases is not possible Moreover it is highly unlikely that you will be able to debug your code with such a large input /output file
 » 8 months ago, # |   -55 Is it rated?
•  » » 8 months ago, # ^ |   +40 Are You Retarded?
•  » » » 8 months ago, # ^ |   +64 it's not my comment. but i still want to apologize
•  » » » » 8 months ago, # ^ |   -14
•  » » » 8 months ago, # ^ |   -33 How to download Test #15 of 650C Table Compression?
 » 8 months ago, # |   +46 Obligatory comment: "Hope the problem statements are as short as the announcement"
 » 8 months ago, # | ← Rev. 2 →   +18 Have seen you being quite responsive in the last contest. Keep up the good work, and well, wish a quality and balanced contest ;)P/s: Yup, I still can't figure out the most optimal income when using Perun's ult xD
•  » » 8 months ago, # ^ |   +3 Thnx :D
 » 8 months ago, # |   +13 Oh... This contest is even later than others T_TToo bad I can't enter it because of... time zone problem...Wish you guys good luck and high ratings anyway ^_^
•  » » 8 months ago, # ^ |   +8 When it starts in your country?
•  » » » 8 months ago, # ^ |   +24 00:35……
•  » » » » 8 months ago, # ^ |   0 I just want to switch on the music Sound of Silence.
•  » » » » 8 months ago, # ^ |   0 its not a friendly time for UTC+8
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 It was supposed to start at 01:35 AM here, and it even became 02:15 :)
•  » » 8 months ago, # ^ |   0 I have been used to the time zone problem...
 » 8 months ago, # |   0 I hope my rating will be more than 1900. Then this contest is unrated for me. I don't like rated contest. My rating will down if I don't do well in this contest. CONTEST, CONTEST and CONTEST ... RATING, RATING and RATING ... TRAINING, TRAINING and TRAINING ... ......
•  » » 8 months ago, # ^ |   -22 if you cheat in this contest, this contest is unrated for you too, and if nobody discover it, you can have a high rating:)
•  » » » 8 months ago, # ^ |   +82
 » 8 months ago, # | ← Rev. 2 →   -22 Good luck to all let's see, can i be a Candidate master at the end of this round or not ... wish me luck... :)
•  » » 8 months ago, # ^ |   0 Good Luck!) Hope you will be a Candidate
•  » » 8 months ago, # ^ |   +5 why people doesnt like this post whats wrong about it
•  » » » 8 months ago, # ^ |   0 He didn't get cm :\
•  » » » » 8 months ago, # ^ |   0 sorry,what is cm?
•  » » » » » 8 months ago, # ^ |   +1 Candidate Master
•  » » » » 8 months ago, # ^ |   0 you're right, i was far away from my ideal performance last night ... too upset for it... :(
•  » » » » 6 months ago, # ^ |   +3 well ... now i'm :)
•  » » » » » 6 months ago, # ^ |   +5 congrats
 » 8 months ago, # |   -6 So sad that magic is over, can't troll with different colored grapes anymore :(
 » 8 months ago, # |   0 I wondered what is different from participant division 2 and division1
•  » » 8 months ago, # ^ |   +8 -The Blue Color and all the colors below it are for Div2 contestants. -the purple color and all the colors above are for Div1 contestants. -Div1 guys can participate in Div2 Rounds unofficially.
•  » » » 8 months ago, # ^ |   0 Thank you :D
•  » » » » 8 months ago, # ^ |   0 u r welcome.
 » 8 months ago, # |   0 really awesome, wait for some blossom
 » 8 months ago, # |   +33 A prime number contest!
•  » » 8 months ago, # ^ |   +1 Nice observation!
 » 8 months ago, # |   -19 not u again
•  » » 8 months ago, # ^ |   +52
•  » » » 8 months ago, # ^ |   +14 No way....
•  » » » » 8 months ago, # ^ | ← Rev. 5 →   0 → Literally JoJo video→ Inserts "reference meme"
•  » » » » » 8 months ago, # ^ |   +5 → Literally JoJo video→ Obligatory weeb comment
•  » » 8 months ago, # ^ |   +4 Look on the bright side, man, this time there are no pupil users as problemsetters :D
 » 8 months ago, # |   -23 How to download Test #15 of 650C Table Compression?
•  » » 8 months ago, # ^ |   0 Unfortunately , the large inputs can't be previewed completely. if you stuck with the problem you can see the tutorial of the contest (here). if you still stuck , you can check out the Accepted solutions (here).
 » 8 months ago, # |   +13 "Yet the statements are guaranteed to be short :)" this is the best announcement so far.
•  » » 8 months ago, # ^ |   -49 how to download test 15 on 650 C table compression
 » 8 months ago, # |   -8 Yet the statements are guaranteed to be short :)Thank you very much:)
 » 8 months ago, # |   +11 Unusual early scoring!
 » 8 months ago, # | ← Rev. 2 →   +23 "Codeforces и Polygon"Learning some russian.Learning everywhere. :)
•  » » 8 months ago, # ^ |   +6 Learning so much that you start to understand Croatian. (Source: COCI 2016/17 Round #6 solution, p. 4, line 8) Let Pa < Pb i k * Pa ≤ Pb < (k + 1) * Pa.
 » 8 months ago, # | ← Rev. 2 →   +2 Hope another great problem set from this amazing head. Big chance to rise up. CF is too good to stay away from. :)
 » 8 months ago, # |   -7 Can anyone help me with one problem? I have good answer on test 2 on my computer, but on codeforces I get WA no matter what I do. Obviously compiler settings or something isnt same. Just visit my problem and check last submissions, problem C from few rounds before. 34983468
•  » » 8 months ago, # ^ |   0 Test ur program on custom invocation and u will undrestand why got WA.
 » 8 months ago, # | ← Rev. 2 →   +14 It's quite strange no one noted that this round coincides with CSA round #68 tomorrow! Can't you just delay it 30 more mins? GreenGrapeUPD: the contest is delay 40 mins!
•  » » 8 months ago, # ^ |   +5 More like, CSA coincides with Codeforces Round 461.
•  » » » 8 months ago, # ^ |   +10 linguistically, is there a difference?!
•  » » » 8 months ago, # ^ |   +4 I mean, CSA consistently hosts contests only in that time slot.I guess it went under the radar since they start 30mins earlier until recently.
•  » » 8 months ago, # ^ |   +1 CF round moved by 40 minutes.
 » 8 months ago, # |   +7 Glad to hear this: Yet the statements are guaranteed to be short :) Looking forward to it !!!
 » 8 months ago, # |   -11 How to download Test #15 of 650C Table Compression?
•  » » 8 months ago, # ^ |   +16 Okay, this should be the last time I see this anywhere.You cannot do that. At all.(Well, except if the problem setter provide the full package publicly).For convenience, all test cases are compressed in case they are too big, so large input/output files are near to complete omittance.Usually, if you get stuck with a big tests, it can only mean a few things: You ran out of memory (MLE verdict). You ran out of time / your algorithm was too complex (TLE verdict). You handled the undefined behaviors poorly (WA/RE verdict). These tests are mostly used to tests how a code works against large input streams, and not to be corner cases, so please check your own source code for places that can be optimized, not just spamming the blogs all the time.
 » 8 months ago, # |   +34 Normal guy's Imp.Codeforces member's Imp.
 » 8 months ago, # |   +117 Is it legal?
•  » » 8 months ago, # ^ |   +34 I registered him manually, just a prank ^^
•  » » » 8 months ago, # ^ |   +54 How is registering someone in a contest a prank?
•  » » » » 8 months ago, # ^ |   +8 It’s just weird so a little funny. Pseudo will be like “wtf, dude” .. hence.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   +3 Seems someone also wanted to prank you and registered you manually :P See you on leaderboard :D
•  » » » » 8 months ago, # ^ |   +5 This will be the first time someone solve all problems in 1 minute :D
 » 8 months ago, # |   +11 I am gonna solve A, B and C today !
•  » » 8 months ago, # ^ |   0 Best of luck !
•  » » » 8 months ago, # ^ |   0 Thanks Izanagi !!! I Hope, you will also do well in this round.
•  » » 8 months ago, # ^ |   0 you will solve nothing we will come newbie
•  » » » 8 months ago, # ^ |   +4 o yeah ! I have solved A, B and C !
•  » » » » 8 months ago, # ^ |   0 only pretest passed
•  » » » » 8 months ago, # ^ |   0 only pretest passed**
•  » » » » » 8 months ago, # ^ |   0 Let's see after system testing !
•  » » » » » » 8 months ago, # ^ |   0 i hope we solve nothinh
•  » » » » » » 8 months ago, # ^ |   0 i hope we solve nothing
•  » » » » » » » 8 months ago, # ^ |   0 Problem — C Time limit exceeded on test 60 ! :'(
•  » » » » » » » » 8 months ago, # ^ |   0 be peptimistic
•  » » 8 months ago, # ^ |   0 Pretests passed
 » 8 months ago, # | ← Rev. 7 →   +55 Wow :O
•  » » 8 months ago, # ^ |   +15 And I thought heaven didn't exist.
 » 8 months ago, # | ← Rev. 2 →   +1 Two line summary of the announcement : 1. The statements are guaranteed to be short :) 2. There will be six problems with the following scoring: 500 — 1000 — 1250 — 1500 — 2000 — 2750
 » 8 months ago, # | ← Rev. 2 →   +1 The time is a little late for me,but I am still glad to take part in the round.It's really a good chance to train myself. :)
 » 8 months ago, # |   0 I just want to say it's too late for Asian contestants . Hope I will stay alive for being such late......
•  » » 8 months ago, # ^ |   0 One hour earlier, but yeah, I feel you, dude...12:15 AM in UTC+7 (Hanoi, Vietnam). Uh-oh...
 » 8 months ago, # |   0 Hope I can become Expert!
•  » » 8 months ago, # ^ |   +6 Happy!
•  » » » 8 months ago, # ^ |   0 Congrats :)
 » 8 months ago, # |   -8 Sanwli saloni, adaayein manmohni Tere jaisi beauty kisi ki vi ni honi Thande ki botal main tera opener Tujhe ghatt ghatt main pee lon Coca Cola tu ROUND GONNA BE AMAZING !
•  » » 8 months ago, # ^ |   +2 You Should Behave On website like codeforces , though fun is necessary , but people seach for good comments over here . I hope you understand it ! Good Luck for contest .
 » 8 months ago, # |   0 Let's see How this go?
 » 8 months ago, # |   +1 i think i will be green this time,thank you GreenGrape.
•  » » 8 months ago, # ^ |   +1 Pessimism level: NONELOVEME
 » 8 months ago, # |   -24 is it rated??
•  » » 8 months ago, # ^ |   0 i think you love negative contribution.
•  » » » 8 months ago, # ^ |   0 it increases my ego and confidence , yes.
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   0
•  » » » » » 8 months ago, # ^ |   -11 if you really get annoyed because of some online comments you need help:)
•  » » » » » » 8 months ago, # ^ |   0 may be this site is not just a random website for many people
•  » » » » » » » 8 months ago, # ^ |   0
•  » » » » » » » » 8 months ago, # ^ |   0 who knows :D
•  » » » » 8 months ago, # ^ |   +3 I want a 'HaHa' button(as in fb) in codeforces, people have become too funny :v
•  » » » » » 8 months ago, # ^ |   -6 yes i would spam that button on every comment of yours
 » 8 months ago, # |   0 can't wait.....
 » 8 months ago, # |   +11 Again a round with near 7000 participation :)
 » 8 months ago, # |   +3 I hope the long queue is fixed before the contest starts
•  » » 8 months ago, # ^ |   +12 I hope the int vector is fixed setprecision(10) after the contest end ;!
 » 8 months ago, # |   +1 How's this possible?!
•  » » 8 months ago, # ^ |   +5 What's wrong? I thought you can lock the problem as long as you have the "Pretest passed" verdict, irrespective of whether you get hacked or not. Correct me if I am wrong.
•  » » » 8 months ago, # ^ |   +3 Nope, you can't lock after you got hacked. But I think it happened because times are very close.
•  » » » » 8 months ago, # ^ |   0 Oh okay, that's interesting. This probably happened because of the long hack queues today.
 » 8 months ago, # | ← Rev. 2 →   0 Contest of hacks... :D
 » 8 months ago, # |   +8 very long queue in hacks
 » 8 months ago, # |   +6 HackerRank will be proud of this contest
 » 8 months ago, # |   +27 I think this contest are more "Successful hacking attempt" messages than "Accepted"
 » 8 months ago, # | ← Rev. 2 →   +15 A round full of hacks. Even one of my friends hacked me, nice contest
 » 8 months ago, # | ← Rev. 2 →   0 Hackforces in a nutshell...Anyway, to be serious, maybe it was just me, but I think the scoring is still a little bit underrated. This should be 500-1000-1500-1750-2250-3000. C is sufficient to be called a Div2C, D is somehow quite twisted (got 4 WAs verdict on the 4th problems, all on pretest 4).Not really sure about my opinion about E and F, coz' I have just read it for a short while.After all, it was fun actually. And these Imps are just cute ^^UPD: I took my words about D back. Somehow I wish I could think sharper...
•  » » 8 months ago, # ^ |   +4 Even you hacked me. This is first time in my life when I got 3 hacks on A
•  » » » 8 months ago, # ^ |   +5 Everyone has their own bad days...I also faced the same situation as you, once at Codecraft-18 and Codeforces Round #458 (Div. 1 + Div. 2, combined).
•  » » » 8 months ago, # ^ |   0 bravo
 » 8 months ago, # | ← Rev. 2 →   +3 Can someone please provide explanation for third testcase of problem E.
•  » » 8 months ago, # ^ |   +18 I think you are confused just like I was — summoning a bird doesn't increase your mana, it increases you maximum mana.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   +3 Ohh Thanks.Same mistake
•  » » 8 months ago, # ^ |   +8 Take 1 bird from the first nest (you don't have enough mana to take two birds), take 10 birds from second nest (your mana capacity is 17 and you have 15 mana so you can take them all).
 » 8 months ago, # |   0 Problem D is solvable with radix sort?
•  » » 8 months ago, # ^ |   +7 I just used normal sorting with a comparing function that returns numS[a] * numH[b] > numS[b] * numH[a]
•  » » » 8 months ago, # ^ |   0 Hell man! :'( I tried to do it with normal comparison too but that condition didn't pop up to my mind! How can you prove this works ?
•  » » » » 8 months ago, # ^ |   +8 Given a string s, denote f(s) to be the number of subsequences 'sh'. Now given strings s1, s2, ... sn, it is easy to prove that if we denote xi, yi as the number of 's' and 'h' in string si, that . To maximize our desired value, all we need to look is the value . For n = 2, it's trivial that the comparing function wewark described works.We will induct on n — say the comparing function works for n and we prove it works for n + 1. Clearly, , as after deciding which sn + 1 to choose, we are left with optimizing the value with n strings. (induction hypothesis is used here)Now, all we need to do is prove that we need to put sn + 1 as the string with the highest value. This is simply greedy, easy to prove.
•  » » » » 8 months ago, # ^ |   0 Let's assume we have two strings a = sshhh and b = ssshhh.we can do a + b = sshhhssshhh.And b + a = ssshhhsshhh.How many sh's we got after this concatenation? We can note that this value is numS[a] * nums[b], because we didn't lose any sh's that were in a or in b, so what we got is .The same logic works for .
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 Do you have a formal proof of such comparator?UPD Just came up with your idea.
•  » » » 8 months ago, # ^ |   0 Got it, thank you all.
 » 8 months ago, # |   +3 The 1st problem made for the hack..
 » 8 months ago, # |   +1 Idea behind C ?
•  » » 8 months ago, # ^ |   0 For small Ks (probably <= 1000) you will find two exact values, so just implement
•  » » 8 months ago, # ^ |   0 just do it with brute force :)
•  » » » 8 months ago, # ^ |   0 Ok. Limits are very large so how do you guarantee fast running time ?
•  » » » » 8 months ago, # ^ |   0 it will find a pair soon
•  » » » » » 8 months ago, # ^ |   +2 Thats what my questions is. How to prove that ?
•  » » » » » » 8 months ago, # ^ | ← Rev. 2 →   +7 It is known that (a very important consequence/equivalence of prime number theorem) . For n, k to be good, (n + 1) must be a multiple of . So n must be like ek. This should be good enough, as running time is .
•  » » » » » » » 8 months ago, # ^ |   +13 Or, say primes >10 will multiply, so it be over 10^18 fast...
•  » » » » » » » 8 months ago, # ^ | ← Rev. 3 →   0 Bruteforce works. :) This was my approach.gcd(1,2,...,k) = 1 Therefore, lcm(1,2,...,k) = 1*2*3*..*k Also, since the remainders have to be distinct, one observation is that for any i between 1 to k, n%i should be equal to i-1.This means: n = i*C + i-1 ==> (n+1)%i = 0. Therefore n+1 should divide all the numbers from 1 to k. This also means that n+1 should be equal to the least common multiple of 1,2,..,k (in this case its just the product.) or any multiple of this lcm. Looping from 1 to k and stopping the loop whenever product crosses n+1. Product crosses n+1 easily by the time we reach i=50 in the loop. We return "No" in this case. If k! is equal to n+1 then we return "Yes"
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   -7 try thisbool f;int top=0;for(int n=1;n<=100000;n++){for(int k=1;k
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 People have this idea:Since you need to have all unique values till k. They should be obtained serially from 1,2,3,..k like this: 0,1,2,3,4,5...k-1so, n should be of the form: 2x+1, 3x+2, 4x+3, 5x+4, 6x+5, 7x+6,... all at the same time. But if something is of the form 5x+4 .. it cannot be of the form 2x+1 .. (coz one is odd and other is even, for even x, similarly chose a pair for odd x) Edit:The conclusion seems flawed. Maybe we can continue the logic like this:Number has to be of form: 2x+1, so 3,5,7,9.. 3x+2, so 5,8,11,14.. ... ....It kind of creating a sieve of eratosthenes, which generates a prime number.I don't what that gets us :)
 » 8 months ago, # |   +9 Locking after being hacked
 » 8 months ago, # |   +6 how to solve D?
•  » » 8 months ago, # ^ |   0 sorting : )
•  » » » 8 months ago, # ^ |   0 merge or bubble
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 consider to string a and blet the number of 's' in a be a.S and the number of 'h' be a.Hif you arrange a and b be abthe you will get a.S*b.H pairsso we know that if a.S*b.H>b.S*a.H then a should be in front of b
 » 8 months ago, # |   0 What was the hack for A?
•  » » 8 months ago, # ^ |   0 if you donnot have a copy,you cannot get more copy
•  » » 8 months ago, # ^ |   0 Most common one: x 1 (while x is a positive even number).Expected answer: "NO" (as there are no initial copies to generate new ones)
•  » » 8 months ago, # ^ | ← Rev. 2 →   +3 0 00 11 03 02 1
•  » » 8 months ago, # ^ |   0 2 1output NO
•  » » 8 months ago, # ^ |   0 something!=0, y=0 and something!=0, y=1
•  » » 8 months ago, # ^ |   0 4 1
 » 8 months ago, # |   +5 Problem A just burn my room
 » 8 months ago, # |   0 What is wrong this this solution for E?Let dp[i][j] be the max mana we have at tree i with j summoned in the trees before us. The max capacity is always w + j·b for a fixed j so we don't have to store that. I used long long int here and for dp table so no overflow. The answer is the largest i such that dp[n][i] is valid. I kept getting WA on pretest 5.
•  » » 8 months ago, # ^ |   0 it's correct
•  » » 8 months ago, # ^ |   0 Did you use sliding window maximum?
•  » » 8 months ago, # ^ | ← Rev. 2 →   +3 problem is that max summoned birds numbercan be ci * n = 103 * 104 = 107, so your array will have size dp[103][107].EDIT: I didn't read task carefully :{
 » 8 months ago, # |   +1 How to solve B? Seems easy cause lot of people solved it, but I only solved C and D.
•  » » 8 months ago, # ^ |   +7 ans = 0 for a = 1 .. n for b = a .. n c = a ^ b if b <= c <= n and a + b > c ans++ print ans 
•  » » » 8 months ago, # ^ |   +3 Wow.. I'm a fool :) Thanks for your reply! (And all the others too)
•  » » 8 months ago, # ^ |   +3 can you please tell me how to solve C?
•  » » » 8 months ago, # ^ |   0 Try 1~50
•  » » » 8 months ago, # ^ |   0 n mod 1 , ... , n mod k has to be different. but you can easily notice that n mod 1 is always 0. So, n mod 2 must be equal to 1, because n mod 2 is 0 or 1, but it cannot be 0. ... n mod i must be equal to i-1, which means that n+1 is divisible by 1, 2, ..., k.
•  » » 8 months ago, # ^ |   +3 For a <= n, b <= n, let c = a ^ b, if all other conditions hold, then increment answer
•  » » 8 months ago, # ^ |   +3 a^b^c = 0 implies a^b = c. So bruteforce for a, b, and check if the 3 numbers can form sides of a triangle.
•  » » 8 months ago, # ^ |   0 You can iterate through all possible cases of a and b. c can be calculated by bitwise xor:As a xor b xor c = 0, we can agree that c = a xor b.If c is not lower than a or b, and not greater than n, and a,b,c forms a non-degenerate triangle (simply check that if all 3 inequalities of triangles are proved right), then you can add 1 to the answer.
•  » » 8 months ago, # ^ |   +3 Simply iterate over all a, b values . Check a + b > c, a + c > b and b + c > a
•  » » 8 months ago, # ^ |   +1 I actually passed it with brute forcing which is O(N^3). It gave me 780ms even though it doesn't seem to be the intended solution.
•  » » » 8 months ago, # ^ |   +3 Your condition ( c < a + b ) in the third loop in your code makes it about O(n^2) i belive
•  » » » » 8 months ago, # ^ |   0 it is still O(n^3) with very small constant.
 » 8 months ago, # |   +1 Test for hack C: 1 2
•  » » 8 months ago, # ^ |   0 Isn't it "yes" ?
•  » » » 8 months ago, # ^ |   +7 Yes. Many people (me too) have writen: if( n < k ) cout << "No";
•  » » » » 8 months ago, # ^ |   0 Bad luck, man
•  » » » » 8 months ago, # ^ |   0 fortunately I had written n<=k so it failed pretest and I was able to correct it. and now i'm purple.
•  » » 8 months ago, # ^ |   0 pretty sure this is the case that got me
 » 8 months ago, # |   0 How to solve F? I tried taking all N numbers initially and consecutively removing the one which will decrease f(I) the most but such that f(I) ≥ k will remain true. Just plain intuition, didn't work.
•  » » 8 months ago, # ^ |   0 I bruteforced n<=17, implemented it for larger n, it worked well for all local inputs. Still kept getting TLE on the 7th pretest. I just wonder whether it was my complexity, I/O, special countertest designed to make this kind of solution fail...
•  » » 8 months ago, # ^ |   0 Explanation — Problem F
•  » » » 8 months ago, # ^ |   0 Man, them noise and echo are simply unbearable which makes your speech unrecognizable.
 » 8 months ago, # |   +19
•  » » 8 months ago, # ^ |   0 Is it so interesting to post one picture several times?
 » 8 months ago, # |   +1 In question D, what is the pretest 4?
 » 8 months ago, # | ← Rev. 2 →   +46 I think there should be a limit on the number of hacks for each problem... Yeah hacks are a part of CF, but when a hacker with ABC has more points than a non-hacker with ABCD, I think there is a problem.
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 I think so too.On today's A,same hacker hacks same participant many times…For example,Hack 0 1 -> Hack 1 0 -> Hack 0 0…At least,some fix is need to this system…
•  » » » 8 months ago, # ^ |   0 what is the output for test case 0 1???Isn't it "YES"??
•  » » » » 8 months ago, # ^ |   0 Yes
•  » » » » » 8 months ago, # ^ |   0 For 0 0 and 1 0???
•  » » » » » » 8 months ago, # ^ |   0 NO NO
•  » » » » » » » 8 months ago, # ^ |   0 Everything is ok. but how/why my code is hacked??
•  » » » » » » » » 8 months ago, # ^ |   0 for 10001 1? should be No
•  » » » » » » » » » 8 months ago, # ^ |   0 found "NO"
•  » » » » » » » » » 8 months ago, # ^ |   0 Is case sensitivity a problem? NO vs No ?
•  » » » » » » » » 8 months ago, # ^ |   0 3 1 -> NO…?
•  » » » » » » » » » 8 months ago, # ^ |   0 found "NO"
•  » » » » » » » » » 8 months ago, # ^ |   0 4 1 should be NO
 » 8 months ago, # |   0 Can anyone give me some idea for 922F - Делимость
•  » » 8 months ago, # ^ |   +6 for i = 1 .. n for j = i .. n, j += i d[j]++ if sum(d) < k print no otherwise, kick out some numbers > n/2 - since they do not have multiples - so that number of pairs will decrease to k 
•  » » » 8 months ago, # ^ |   0 will this work for very small k?
 » 8 months ago, # |   0 can someone help me find why i was hacked in problem C? 35018691
•  » » 8 months ago, # ^ |   +8 n=1 k=2 answer:yes
 » 8 months ago, # |   0 Short statements not means a lot of hacks.
 » 8 months ago, # |   +11 This was the biggest slaughter since I started to participate at contests
 » 8 months ago, # | ← Rev. 2 →   +3 When will the system testing start ?Update: System testing started :)
 » 8 months ago, # |   +37 When someone asks how life is going on?
 » 8 months ago, # |   +13 While everybody is discussing today's contest, I just found my love <3Thanks Mike :)
 » 8 months ago, # | ← Rev. 2 →   +75 Isn't it obvious that current hacking system sucks? It's a brilliant idea, but really bad realization. Hacking should give you points (maybe even more than 100) if you find hidden not obvious bug in someone's code. But if you just take n = 0 corner case in div2A and it gives you 1500 points that's so unfair: you get that much points not because you are smart or your debugging skills are better than average, but because you have gray guys in your room who always do this mistake.That's why I think that hacking points must be not a constant, but a function, which depends on how much hacks there are on the problem.
•  » » 8 months ago, # ^ |   +2 if problem difficulty is 500 points so on one hack your receive 100 is 20% but if problem difficulty is 2500 points so on one hack your receive 100 is only 4%
•  » » 8 months ago, # ^ |   +3 til i am a grey
•  » » 8 months ago, # ^ |   0 Agreed. I hacked 18 solutions (Problem A) using only two test cases And guess what? My own solution missed one corner case and I got WA in system test. But 1800 points gave me an unfair advantage.
 » 8 months ago, # | ← Rev. 2 →   +12 Many among you would be disappointed because of all the hacks, but I feel that the problems were super exciting and I enjoyed all the brainstorming while getting hacked.+1 to GreenGrape
 » 8 months ago, # |   0 I don't know why, but my submission got stuck at test 39 for last 10 min.s. I am on page 6 of filtered list
 » 8 months ago, # |   +57 When you find one of the testcases for A
 » 8 months ago, # | ← Rev. 3 →   0 I think that there is a problem with D testcases. This is my AC submission.The problem with my solution is that the comparison is made entirely on integers, and therefore it could overflow.I'll try to generate the testcase, I think that: 2 sssss...ssssssh hhhhh...hhhhhhs is enough.EDIT: oh yes, I think it was enough. My solution gave 50000, but when reversing gave 2499950000. I don't think I'm the only one who failed for this.
•  » » 8 months ago, # ^ |   0 That's actually quite strange since tests 11 and 12 are made exactly to counter this.
•  » » » 8 months ago, # ^ |   +3 I would like to remember that overflow is an undefined behaviour, so anything could happen, even getting an incorrect AC (A guess for why this happens is that the compiler may do some simplifications like x*y/x = y — avoiding the calculation that gets the overflow — maybe something in that line is what happened)
•  » » » » 8 months ago, # ^ |   +3 I tested it using custom invocation, and it gives the incorrect output there (50k instead of 2499..etc).
•  » » » 8 months ago, # ^ |   0 Oh, I think I know what's happening here. My submissions treats different the strings consisting of only 'h' or only 's', so that's why my submission passed.
•  » » » » 8 months ago, # ^ |   0 lucky you didn't loose 100 points on tc 11.:)
•  » » 8 months ago, # ^ |   0 35024915 this solution gets tle on your test, if i am not mistaken. if so, D should be reevaluated
•  » » » 8 months ago, # ^ |   0 Looks fine to me. Total characters are 200000.
•  » » » » 8 months ago, # ^ |   0 yeah, i realized that i tested it wrong right now, sorry
 » 8 months ago, # |   +3 long long contest! #define int long long accept my C and D :)
 » 8 months ago, # |   0 Problem A states: "Initially, Imp has only one original toy. but system test 20 tests for 0 (ZERO)!!!!!!
•  » » 8 months ago, # ^ |   0 Print "Yes", if the desired configuration is possible, and "No" otherwise. so when input is 0 you should say no because he have 1
•  » » » 8 months ago, # ^ |   0 I have read again the problem before seeing your reply and come back here to delete my post, but now i leave it. Of course you are right.
 » 8 months ago, # |   +4 Can't believe my STUPID code for C got pretests passed even and finally failed on test 76th!!! I used k instead of i in my loop.Failed.vsAccepted.
 » 8 months ago, # |   +13 Couldn't proof the solution for C during the contest. But now, I think I got a proof.Correct me if I'm wrong plz.If the answer for n is "yes", then for all i from the set [1,k] will have distinct remainders.We can easily see that for all i [1,k] n mod i == i — 1,so, we can say (n + 1) mod i == i == 0 ;That means all i [1,k] must divide (n+1) simultaneously.Which means (n+1) must be divisible by the lcm(1,2,3,........,k).Now the lcm(1,2,3,.........,k) would be > 1e18 when k is > 41(or something) .That's why the brute-force solution worked.
 » 8 months ago, # |   0 ohuenniy round
•  » » 8 months ago, # ^ |   0 ploxo materit'sa
 » 8 months ago, # |   +5 who is sorry-haghani ?!HAGHANI ...
•  » » 8 months ago, # ^ |   0 I think he is DarkestLight !
•  » » » 8 months ago, # ^ |   0 it's possible ... :)
 » 8 months ago, # |   0 Can anyone explain? :( 35036774 35011492
•  » » 8 months ago, # ^ |   +13 never use >= or <= on a cmp function. this is your accepted code 35038659
•  » » » 8 months ago, # ^ |   0 <= got Accepted 35037198could you please explain why should we avoid <= or >= in compare function?
•  » » » » 8 months ago, # ^ |   +6 you can read why here
•  » » » » » 8 months ago, # ^ |   0 Thanks :)
•  » » » 8 months ago, # ^ |   +5 Oh thanks:(
•  » » 8 months ago, # ^ |   +10 don't know why but writing this line in cmp function gives AC 35038641 return a.cnt[1]*b.cnt[0]
 » 8 months ago, # |   +5 Solving the B in O(n^3) no problem... i would say a O(n^2) solution was intended but anyway: http://codeforces.com/contest/922/submission/35039399
•  » » 8 months ago, # ^ |   0 lol. Does it pass with int as well?
•  » » » 8 months ago, # ^ |   +8
 » 8 months ago, # |   +8 Hello, world!
 » 8 months ago, # |   0 Why is my code giving runtime error on test 5 in D : Link
•  » » 8 months ago, # ^ |   0 as ajecc mentioned above never use >= or <= on a compare functionhttp://codeforces.com/blog/entry/57538?#comment-412900
 » 8 months ago, # |   +1 This was one of the best and most interesting contests on codeforces that i have given. So much of hacks and good difficulty distribution i should say ,awesome GreenGrape
 » 8 months ago, # |   +10 GreenGrape has never been Green on Codeforces.
•  » » 8 months ago, # ^ |   +8 Actually he was during new year magic
 » 8 months ago, # |   -29 contest was shit , weak pretests
 » 8 months ago, # | ← Rev. 2 →   0 I don't understand A number problem. please, anyone, help me to understand this problem. problem link : http://codeforces.com/problemset/problem/922/A thanks
•  » » 8 months ago, # ^ |   0 you start with o. Then you do magic copy to get additional o and c. Now you have : o,o,cNext you do magic copy on c and get additional c and c , so a total of 3 c,c,c. Likewise.
•  » » » 8 months ago, # ^ |   0 thanks brother
 » 8 months ago, # |   0 http://codeforces.com/contest/922/submission/35048494 why i am facing runtime error thanx in advance
•  » » 8 months ago, # ^ |   +1 try swapping these statement in your comp function if (!h1) return true; if (!h2) return false;
•  » » » 8 months ago, # ^ |   0 But what is logic behind this swap statement
•  » » » » 8 months ago, # ^ |   +1 If 2 equal objects are passed it should always return false. before it could return true.
•  » » » » » 8 months ago, # ^ |   0 Thanx alot
 » 8 months ago, # |   0
 » 8 months ago, # | ← Rev. 2 →   0 Problem B, O(n^3) without pragma 35154154....using pargma only make it a little faster..35129118
•  » » 8 months ago, # ^ |   0 exactly. this n is too small.
 » 7 months ago, # |   0 In Problem B, why (1,2,3)is not a valid set?
•  » » 7 months ago, # ^ |   0 Because it's a degenerate triangle (1+2 = 3) the
•  » » » 7 months ago, # ^ |   0 Oh! A triangle! thanks, I should learn to read the question carefully!