### GreenGrape's blog

By GreenGrape, 10 months ago, translation, ,

Hey, Codeforces!

Hope that the last few days were quite productive for all of you in terms of rest and pleasure. Time to forget about messing with handle colors and get back to coding!

I'm proud to usher the first contest of the year — Codeforces Round #456, which is going to be held on Friday, 17:35 MSK. The round will be rated for all division 2 participants. Anyway, we will be glad to see whoever decides to join us out-of-competition :)

The authors are — GreenGrape and rek (don't worry, it's all about New Year magic ^^). My heartfelt gratitude to Kolya (KAN) for his invaluable help in round coordination, Grisha (gritukan) and Oleg (x3n) for testing and correcting statements, Dima (cdkrot) and Gleb (glebodin) for preliminary solving, AmirReza (Arpa) for close reading and Mike (MikeMirzayanov) for awesome Codeforces and Polygon platforms.

We look forward to brightening up your cold winter evening :)

GL & HF!

UPD. There will be five problems with the following scoring:
500 — 1000 — 1750 — 2000 — 2500
As usual, it's strictly recommended to look through all problems :)

UPD. Please note that the registration was delayed for a few hours.

UPD. The contest is over.
It turned out to be a little bit more complicated than we expected. Still we hope you learned something new :)

UPD. Editorial!

UPD. Congratulations to the winners!

Div. 2:

Div. 1 (unofficial):

•
• +499
•

 » 10 months ago, # | ← Rev. 2 →   +29 The announcement is made early for once :)
 » 10 months ago, # |   +136 For some of us it might be morning
•  » » 10 months ago, # ^ |   +82 Where are the other Grapes?
•  » » » 10 months ago, # ^ |   +45 BlueGrape and GrayGrape seems like poison, no?
•  » » » » 10 months ago, # ^ |   +11 they were used in grapefruit
•  » » » » 9 months ago, # ^ |   +23 Here I am, hybrid grape...
•  » » » » » 9 months ago, # ^ |   +10 You can just dip in nutella
•  » » 10 months ago, # ^ |   +2 Hopefully it doesn't impact the registration statistacks
•  » » » 9 months ago, # ^ |   +3 I always check statistacks at right time
•  » » 10 months ago, # ^ |   +24 For some of us it's summer (yay, southern hemisphere). I'm guessing some peole even have it as summer AND morning!
 » 10 months ago, # |   +22 "Time to forget about messing with handle colors and get back to coding!"If the registeration was by color ... there would be no div.2 participants, the whole scoreboard will be painted in red :D
•  » » 10 months ago, # ^ |   +9 Meanwhile the contest-setter himself also messing with handle colors
 » 10 months ago, # |   +173 Don't skip the opportunity to hack legendary grandmasters
•  » » 10 months ago, # ^ |   +7 Thank you for remaining this moment)
•  » » 10 months ago, # ^ |   -36 you even might be able to hack some tourists if you know what i mean ;)
 » 10 months ago, # |   +22 Thank you GreenGrape for one more contest, also I'm really thankful to MikeMirzayanov for giving us chance to have fun.Good Luck and Have Fun)
•  » » 10 months ago, # ^ |   +56 Thanks for protecting Subaru. :)
•  » » » 10 months ago, # ^ |   +21 He would re:spawn anyways :/
•  » » » 10 months ago, # ^ |   +16 And thanks for not killing Ararararagi.
 » 10 months ago, # |   +63 At first, I freaked out seeing the authors' handle colors...then I looked at my handle color xD
 » 10 months ago, # | ← Rev. 2 →   0 Wew!@ Time to do what I once didnt/couldn't:)
 » 10 months ago, # |   0 Welcome to the first contest in 2018. Sure fun for us.
 » 10 months ago, # | ← Rev. 3 →   +5 First one in 2018 ;) IsIt0.5Rated?
 » 10 months ago, # |   +5 a lot of Legendary grandmaster will participait in this contest sounds like very intresting :)
 » 10 months ago, # |   0 New Year magic workouts! Makes LegendaryGrandmasters to Brain storm for score in Div.2.
 » 10 months ago, # |   0 hacking might get confusing!
•  » » 10 months ago, # ^ |   +16 don't worry, now colors are deceptive, but during the contest they will be returned to the real state if I'm not mistaken.
 » 10 months ago, # |   +7 Wishing everyone high ratings and lots of green AC this year
 » 10 months ago, # | ← Rev. 2 →   -44 LOL
•  » » 10 months ago, # ^ |   +6 i don't understand the context????
•  » » 10 months ago, # ^ |   +53 Fool or genius?http://codeforces.com/contest/484/submission/8757420
•  » » » 10 months ago, # ^ |   0 OMG ,How did he/she do that?:|
•  » » » » 10 months ago, # ^ |   +34 Did you just not asume he's / she's gender?
•  » » » » » 10 months ago, # ^ |   0 Lol
•  » » » 10 months ago, # ^ |   0 Ofc he/she is a genius dude :)
•  » » » 10 months ago, # ^ |   -22 foooooooooolostad bebakhsid ;)
•  » » » 9 months ago, # ^ |   +15 When you are a doctor , but you want to code :p
•  » » » 9 months ago, # ^ |   0 I think Microsoft Word was help him!)
•  » » » 9 months ago, # ^ |   0 cryptography seems to be professor's research area :DMaybe an ingenious idea to prevent hacks!
•  » » » 9 months ago, # ^ |   0 Perhaps Huffman coding can be done to compress the code size...lol
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 But if someone cheated using this technique, it will be hard to detect with human eyes. And i think this is not hard to implement.
•  » » » » 9 months ago, # ^ |   0 What if the the code was scanned for cheating after all the defines were preprocessed out?
 » 10 months ago, # |   -17 rated hahahaha
 » 10 months ago, # | ← Rev. 3 →   0 My solution was caught in plagiarism with another of my own solution in the last educational codeforces round. The problem has not been rectified yet. Can somebody help ????Upd: The solutions have been accepted but the rating change has not been reflected. P.S I am a div2 contestant . Don't look at my color.Upd2: I saw mike's blog post . The issue has been resolved. Thanks
 » 10 months ago, # |   0 Time for changing color ;p
 » 10 months ago, # |   0 A contest where newbies and pupils will hack grandmasters codes. :P
 » 10 months ago, # |   0 Old handles are appearing in the contest registrants page instead of new ones, is it a bug? Or its meant to be ???
 » 10 months ago, # |   +8 Fastest score distribution ...!!! :)
•  » » 9 months ago, # ^ |   +25 Took us three days of furious debates, huh :)
 » 10 months ago, # |   -32 this contest will be pretty confusing to these people who depend on color to hack
 » 9 months ago, # |   +7 My new year's resolution : "Become a candidate master". Wishing for ratings, not colour. :)
 » 9 months ago, # |   -6 RUSH B!!!!!!!!!!!!!!!!!
•  » » 9 months ago, # ^ |   0 a Russian playing CS GO .
 » 9 months ago, # |   -26 I hope D and E will be very difficult so nobody can solve them
•  » » 9 months ago, # ^ |   0 Why!just wish a good luck and interesting problems -_-
 » 9 months ago, # |   +5 There are so many Red Coders participating this time!! :P
•  » » 9 months ago, # ^ |   +18 especially in div 2
•  » » » 9 months ago, # ^ |   +1 and many newbies in div 1
 » 9 months ago, # |   +3 I have a bad feeling, looking at the long queue 3 minutes before the contest...
 » 9 months ago, # |   -9 I hope D and E will be very difficult so nobody can solve them
•  » » 9 months ago, # ^ |   +18 Should've hoped for a Million dollar.
•  » » » 9 months ago, # ^ |   -11 HAHA Looks like problems D and E are very difficult.
•  » » » » 9 months ago, # ^ |   +9 Easier than C
•  » » » » » 9 months ago, # ^ |   0 Would not be surprised if more people solved both D and E than C
•  » » » » » » 9 months ago, # ^ |   0 Hey, you were right.Seems like people of codeforces do not like reading essays.
 » 9 months ago, # | ← Rev. 2 →   +18 I believe the problem setter has set the questions seeing the color of participants and not ratings. :( Now I realize, how tough it is to be a LGM.
 » 9 months ago, # |   +13 does Problem C refers to Dota2? Lol
•  » » 9 months ago, # ^ | ← Rev. 5 →   -8 Lol
•  » » 9 months ago, # ^ |   0 In Slavic mythology, Perun is equivalent to Zeus, so yes, it does :)
•  » » 9 months ago, # ^ |   0 Feels good when I know a reference to something and not anime xD
 » 9 months ago, # |   +9 I don't even understand C
 » 9 months ago, # |   +71 Balancing the difficulty of problemset is the ground rule for preparing of contest.
 » 9 months ago, # |   +3 How to solve E?
•  » » 9 months ago, # ^ |   +5 Meet in the middle and binary search
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 Can you explain your approach. I just hoped that bitmask will suffice.Okay, understood. I actually thought about MIM but didn't think bitmask would be tle.
•  » » » » 9 months ago, # ^ |   +5 Divide array two parts and calculate answers for them as you do in MITM. Then binary search answer with counting numbers which satisfies condition. Be careful with overflow, it cost me 3 WA and a lot of time
 » 9 months ago, # |   +13 Is intended solution for E is binary search + meet in the middle?
•  » » 9 months ago, # ^ |   0 Yes.
•  » » 9 months ago, # ^ |   0 Can you elaborate more? I didnt catch the exact idea man.
 » 9 months ago, # |   +7 Can anyone help me with D? :(
•  » » 9 months ago, # ^ |   +6 Linearity of expectation
•  » » » 9 months ago, # ^ |   0 Can you please elaborate
•  » » » » 9 months ago, # ^ |   +2 Expected number of fishes caught = Σ P(catching fish at (xi,yi))Now, select k distinct (xi, yi) such that sum is maximised.P(catching fish at (xi,yi)) = (#Net positions covering (xi,yi))/(#All Net positions)We can start by selecting middle element, and adding neighbors in the order of decreasing probability (using priority queue)
•  » » » » » 9 months ago, # ^ |   0 How do you compute the probability for each of the individual cells of the matrix?
 » 9 months ago, # |   +9 That moment when all you do in life is play DotA 2 and you can't even solve problem C which discusses the Hero Zeus' ulti.
 » 9 months ago, # |   +28 My thought process while trying (and failing) to solve C:At first I was overwhelmed by all the information, but then I realized I can probably store times where regen graphs cross the damage threshold in a treeset and process them before/after each query as needed, and simply ignore everything with maxhealth <= damage, as they will always be killable, so as a result if everyone's max health is less than damage you can kill them anytime (infinite bounty).An hour of spaghetti later, I submit and get WA"Oh, obviously! I forgot the case if regen of an enemy is equal to zero!"WA again same test case"Oh, of course! I forgot the case if increase = 0, then bounty can never be infinity"WA again same test case"Oh, right. He can only do integer values, so if it's not evenly divisible I have to consider integer value right before crossing the threshold and right after..."WA again same test caseThere are too many special cases and other things to consider in this problem in my opinion. Maybe Dota2 players who code are super familiar with the algorithm because they do it in their head every time they play, but for the rest of Div2 Codeforces it is not quite as easy. That's the only way I can think of this problem being selected as a C problem.Anyway reply with elegant approaches/solutions if you'd like, they will be much appreciated.
•  » » 9 months ago, # ^ | ← Rev. 3 →   0 Important realisations: 1) If bounty increase is >1 and the max_health of any enemy is <= damage, the answer is -1 2) If bounty increase is >1 and health increase of any enemy is 0 and the last updated health of an enemy is <= damage, the answer -1After taking care of those special cases it is just easy time_line problem where you mark all the +1/-1 points (new enemy I can kill/since this point I can not kill some enemy).I used multiset at first, map later ended up with sorting a vector of time-line points, however always got TLE on the 8th test-case.Overall nice problems, but really pissed by the distribution of correct solutions of the tasks (compare C to D or B).
•  » » 9 months ago, # ^ |   +4 C is annoying to code even if the solution seems elegant while thinking. Maintain 2 sets (RIP and non-RIP, RIP for heroes whose current health <= damage). Maintain an event priority queue. There are three kind of events: -1 (compute bounty), 0 (transfer a given hero from RIP to non-RIP set, to account for regen), 1 (Set current health of a given hero). Process the events in priority (-time, type). There are still annoying edge cases to handle (For example, future events of type 0 can be invalidated by events of type 1).
•  » » » 9 months ago, # ^ |   0 Wait for the authors' solutions, they are much more elegant :)
•  » » 9 months ago, # ^ |   +5 missed the case when increase = 0 but still passed pretests :/
•  » » 9 months ago, # ^ | ← Rev. 2 →   +8 I'm sorry to break it to you. But this is nothing like Dota2. The mechanism are totally different. The idea is only about Dota 2 nothing more. Examples:1) No hero has 0 regeneration2) Bounty is not this way3) You don't care how much gold you get and the bonus will never become infinity So, knowing Dota2 will completely change nothing.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +8 1) Ancient Apparation's ult or Spirit Vessel effect 2) That's true, I must admit :) 3) You actually do care about the amount of gold you get when you play Dota 2Though you are right that Dota 2 experience would not really help with solving this problem :)
•  » » » » 9 months ago, # ^ |   0 Well, what's important is general agreement.The statement implies that there can be a hero with 0 regeneration throughout the whole match, and that's impossible.You can't deny the fact that when you can kill, you'll kill. It doesn't matter how many you kill (AND YOU DON'T WAIT TO +INF TO USE YOUR ULTI)What's important is playing Dota 2 won't help you solve the problem, practicing will!
 » 9 months ago, # | ← Rev. 2 →   0 If (k == 1) { cout << n; return 0; } 
 » 9 months ago, # |   +5 B is a b!*ch -_-
•  » » 9 months ago, # ^ |   0 I spent the most time on B
 » 9 months ago, # |   +8 Didn't even read C
 » 9 months ago, # |   0 Any idea what TC4 is in C?
•  » » 9 months ago, # ^ |   0 increase = 0
•  » » » 9 months ago, # ^ |   0 Oh right, answer will never be -1 in this case.Thanks
 » 9 months ago, # |   0 Idea for E?
•  » » 9 months ago, # ^ |   +26 split array into two parts (I had 6 and 10)calculate all possible numbers for every part with dfs in two arrays L and Rthen do binary search for answer and you must for mid calculate how many are there i and j that L[i]·R[j] ≤ midthat can be done with two pointersworks 1.5 sec
 » 9 months ago, # |   +8 In div2.B I didn't read "no more than k", I thought I had to choose strictly k. :c RIP rating.
•  » » 9 months ago, # ^ |   +1 in B i thought it was saying about exactly k element need to take.but after 1 hour i saw that not more than K.
•  » » 9 months ago, # ^ |   0 I thought it was exactly k too, but I don't think it matters for me because I couldn't solve it anyway
•  » » » 9 months ago, # ^ |   0 Just set all the bits.
•  » » » » 9 months ago, # ^ | ← Rev. 4 →   0 Oh yeah, I think "at most k" is easier, because it is guaranteed to find two numbers in range 1..n who are 1's complements of each other ..is the answer 2^( ceil(lg(n)) )-1 ?
•  » » » » » 9 months ago, # ^ |   +3 find the right most set bit of n and set all the lower bits. If x is rightmost set bit then ans is = 2^x +2^(x-1)+...+2^0Base case if K=1 then ans is n
•  » » » » » » 9 months ago, # ^ |   0 Yeah, and 2^x +2^(x-1)+...+2^0 = 2^(x+1)-1Can't believe it was so simple >_>
 » 9 months ago, # |   +15 Is D just hard work with cases and formulas or there's some elegant solution?
•  » » 9 months ago, # ^ |   +43 Maybe mineI had Dejkstra algorithm. Just start from (n + 1) / 2, (m + 1) / 2take each time point with largest costcost can be calculated like this codell mem(ll x1, ll y1, ll x2, ll y2) { return max(0ll, (x2 - x1 + 1) * (y2 - y1 + 1)); } ll cost(int x, int y) { int x1 = max(1, x - r + 1); int y1 = max(1, y - r + 1); int x2 = min(x, n - r + 1); int y2 = min(y, m - r + 1); return mem(x1, y1, x2, y2); } 
•  » » » 9 months ago, # ^ |   0 Ohhhh, that's nice
•  » » » 9 months ago, # ^ |   0 will it not give TLE as n,m<=100000
•  » » » » 9 months ago, # ^ |   +3 No. It works in 4·K·log(4·K). Or maybe faster)
 » 9 months ago, # |   0 Can anyone tell me what's wrong with this hack?
•  » » 9 months ago, # ^ |   +1 The fact, that only you can see it =)
•  » » » 9 months ago, # ^ |   0 Oops, sorry. It will probably be available after systests.It's a hack for problem C: 3 1 1 0 100 10 10 0 10 10 0 10 10 0 1 1 10 
 » 9 months ago, # |   0 It seems me, that Python and accuracy are incompatible http://codeforces.com/contest/912/submission/33928268
•  » » 9 months ago, # ^ |   0 Not just python, I've seen some C++ solutions using log2() failing on the same test.
•  » » » 9 months ago, # ^ |   0 Devil made this test by himself)
•  » » » 9 months ago, # ^ |   0 a similar thing happened to me... still scratching my head where i went wrongcode
•  » » » » 9 months ago, # ^ |   0 log2() and pow() work with doubles, not ints, so there will alway be some inaccuracy.
•  » » 9 months ago, # ^ |   0 I also failed it the same way, with cpp.
•  » » 9 months ago, # ^ |   0 will math.ceil work?
 » 9 months ago, # |   0 Problem A: very funny...
 » 9 months ago, # | ← Rev. 3 →   +64 After reading Problem C
•  » » 9 months ago, # ^ | ← Rev. 2 →   +1 I read it twice and gave up and started to be dubious about my English reading ability...
 » 9 months ago, # | ← Rev. 4 →   +2 Problem D: Use linearity of expectation. For a cell (i, j), number of squares can be calculated like this: https://ideone.com/KbWoW7 (For upper left corner You find a valid range for lines, a valid range of columns and then you multiply the ranges lengths)Now we have 2 vectors L(i) = the length of range for line i, C(j) = the length of range for column j. So number of squares that contain cell (i, j) = L(i) * C(j);Sort vectors L and C in descending order. So L(0) >= L(1) >= ... >= L(num_of_lines) , C(0) >= C(1) >= .... >= C(num_of_columns)Now at each step we need to choose a line i and a column j which gives the best L(i) * C(j).Mantain a vector Last(i) = For the line i, what is the best column avaible? At the beginning Last(i) = 0;We'll keep a multiset where we insert all lines, and we will keep the multiset sorted by L(i) * C(Last(i)) descending order.Now, we do this k times: Extract beginning of set = A line i, add that L(i) * C(Last(i)) Value. Update Last(i) = Last(i) + 1 Add i to multiset again.
•  » » 9 months ago, # ^ |   0 Can you please explain the thought process behind the formula to calculate the number of squares for a cell.
 » 9 months ago, # |   0 If you solve E with only bitmask (and reverse sorting the given list of primes), what's the complexity?
•  » » 9 months ago, # ^ |   +3 Still won't pass. I did my best putting in tons of heuristics ( that I even used to accept similar problems before), and always got TLE on pretest 5/6. Test cases are strong, good job to the testers/authors.
•  » » » 9 months ago, # ^ |   0 Interesting. I thought as the masks grow, the number of values we need to try decrease significantly. Probably some randomization will be needed. What's the complexity anyway
 » 9 months ago, # |   +21 E passed, time to back Div.1! :-)
•  » » 9 months ago, # ^ |   +4 Well done & congrats.
•  » » 9 months ago, # ^ |   +6 Congratz bratan. Well done
 » 9 months ago, # |   0 I used tenary search for problem C, i still dont know where im wrong Here my code : https://ideone.com/grWZlx
•  » » 9 months ago, # ^ |   +3 The function must be convex or concave for ternary search, this isn't.
 » 9 months ago, # | ← Rev. 2 →   +8 Today I realized,
 » 9 months ago, # |   0 Problem C. Test case 4 is wrong 2 0 1 0 1 10 1 1 2 1 0The second enemy has start health = 1, regen = 0. So I can wait forever to kill him (I have damage = 1), so I can have infinitely gold. The answer is -1. But Jury's answer is 2.My submission. 33945948,
•  » » 9 months ago, # ^ |   +6 Gold increase is 0 as well, so it means that the bounty will be constant.
•  » » 9 months ago, # ^ |   0 Thanks GreenGrape for really quickly answer
 » 9 months ago, # | ← Rev. 3 →   +5 Shouldn't they be disqualified because of cheating?http://codeforces.com/submissions/Combi/contest/912http://codeforces.com/submissions/Cinzaderius/contest/912Upd: Only 1 submission was skipped, really?
•  » » 9 months ago, # ^ |   +3 Wow. :( @MikeMirzayanov
•  » » 9 months ago, # ^ | ← Rev. 2 →   +5 Wait Wait! there's no cheating there, they have a huge difference in problem B, one declared int and the other declared long ;o ._. haha. now on a more serious note :/ come on guys this is to improve over time not just for the ratings.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   -7 I'm send my apology to everybody scerely because of that cheating.I won't send my code to him anytime in the future.Please excuse me!
•  » » 9 months ago, # ^ |   0 They are friends, I'm sure that the next time, they will continue cheating by changing template, such as #define int long long — #define long long long, etc... to avoid being skipped
 » 9 months ago, # |   +2 Why this formula (pow(2,floor(log2(n))+1)-1) failed for #test 48 (n=288230376151711743, k=2) in problem B
•  » » 9 months ago, # ^ | ← Rev. 2 →   +4 There are issues with built in logarithmic functions. For example, in python, the log of that number is 58.0000001 while the actual log is 57.9999...
•  » » » 9 months ago, # ^ |   0 I used builtin log function even after being aware of this issue and having evaded this problem many times in the past. -_-
•  » » » 9 months ago, # ^ |   0 But same code got accepted when I changed long long to long double for n and k. Why is this so?
•  » » » » 9 months ago, # ^ | ← Rev. 4 →   +14 log2 and friends (log2f and log2l), as in the C standard library, accept only double, float and long double parameters. So what happens when you pass a long long to it? C++11 (and future versions) explicitly say integral types get converted to double (not long double!) before calling functions from . Since the values in this testcase are not representable as a double, you get precision issues.Below's what the standard says in §29.9.1. Rule 2 applies in your case."For each set of overloaded functions within , with the exception of abs, there shall be additional overloads sufficient to ensure: If any argument of arithmetic type corresponding to a double parameter has type long double, then all arguments of arithmetic type (6.9.1) corresponding to double parameters are effectively cast to long double. Otherwise, if any argument of arithmetic type corresponding to a double parameter has type double or an integer type, then all arguments of arithmetic type corresponding to double parameters are effectively cast to double. Otherwise, all arguments of arithmetic type corresponding to double parameters have type float."
•  » » » » » 9 months ago, # ^ |   0 I use type conversion. Even after it will not work.a = ((double)log2(n))
•  » » » » » » 9 months ago, # ^ | ← Rev. 2 →   +29 Casting the return value cannot provide you with more precision (since the value is already calculated). That would be CSI-level enhancing :) We want to ask the function to calculate using type long double. There are two ways to do that: log2l(n) or log2((long double)n).
•  » » » » » » » 9 months ago, # ^ |   +15 Thanks for the reply. Now it is working. Thank you again.
•  » » 9 months ago, # ^ |   0 The same condition happens to me and this is the very worst thing. Else we also get contest rating as well. 48.....
•  » » 9 months ago, # ^ | ← Rev. 2 →   0 I also faced the same problem and got wa only for this issue. i tried to get log2 by doing log10(n)/log10(2) but got wa.. while debugging the only thing i got was a precision related issue which i'm experiencing for first time in a built in function.. calling log functions with an extra 'l' at last(taking long double as arg) worked fine..
 » 9 months ago, # |   0 Please note that this announcement is not (yet) attached to the contest.
 » 9 months ago, # |   0 why is rank of some users different from what their rating indicates? this probably happened during Goodbye 2017 coontest.
•  » » 9 months ago, # ^ |   0 http://codeforces.com/blog/entry/56732Users can change their handles and ranks. after 10 of jan ranks will become normal
•  » » » 9 months ago, # ^ |   +4 Now that's normal for many people's :|
•  » » » » 9 months ago, # ^ |   0 that's strange. Now I'm again grey.
•  » » 9 months ago, # ^ |   +8 Muggle spotted . :P
 » 9 months ago, # |   0 prob b http://codeforces.com/contest/912/submission/33945293 test 5 works on the csacademy compiler, but its not the correct answer here?
•  » » 9 months ago, # ^ | ← Rev. 3 →   +9 1UL has type unsigned long. (unsigned) long on 64-bit architectures is a 32-bit type on the Windows ABI and a 64-bit type on Linux (LP64 ABI). Codeforces runs on Windows. You wanted 1ULL :(
 » 9 months ago, # |   0 Where did the editorial go?
 » 9 months ago, # |   0 My solution for A works more than 1 sec. On this test 10^9 10^9 0 10^9 0 Weak tests...
 » 9 months ago, # |   0 Please help me out with Problem B Link to code- http://codeforces.com/contest/912/submission/33950052 I first convert number n to binary, then traverse the binary string checking if '0' is there -> convert it to '1' and decrement k. Getting WA from test case 9.
 » 9 months ago, # |   -14 the round was trash never problemset again
•  » » 9 months ago, # ^ |   +4 How can you be sure if you didn’t even solve B?
•  » » » 9 months ago, # ^ |   -8 i didnt even read the problem B mommy came in room and told me we had to go doktor and i had to leave but shit contest nonetheless becauyse i coldnt fully participate and me rating droped to shit.
•  » » » 9 months ago, # ^ |   -8 plus ur a pupil so you shouldnt set problems at your level
•  » » » » 9 months ago, # ^ |   0 I’m a candidate master, open your eyes :/
•  » » » » » 9 months ago, # ^ |   0 u hav gren name so it mean u pupil noob
 » 9 months ago, # |   0 Hi, Could anyone tell me why Jury's answer for case 11 of Problem C is 1 ? Since I see there is a horizontal line (value = 1), my answer is -1. [input] 1 0 1 0 1 1 1 1
•  » » 9 months ago, # ^ |   +5 oh, I missed that increase is zero. TT