gridnevvvit's blog

By gridnevvvit, 6 years ago, translation, ,

Hello!

Soon (on August 9 at 19:30 MSK) you are lucky to participate in Codeforces Round #195 for Div. 2 participants. Traditionally, Div. 1 participants can take part out of the competition.

Problems have been prepared by me. I want to thank Gerald Agapov (Gerald) for help in preparation of this round, Eugene Sobolev (Seyaua), Vitaly Aksenov (Aksenov239) and Sergey Sukhov (Serega) for testing of problems, Alexander Ignatyev (dudkamaster) for testing of problems and for translation of tutorial, Michael Mirzayanov (MikeMirzayanov) for marvelous Codeforces and Polygon systems, Mary Belova (Delinur) for translation of statements.

We wish everyone good luck and high rating!

UPD: English tutorial

UPD: Congratulations for winners:

Separately, I want to congratulate Egor Kulikov (Egor) — the only person who had passed the all problems!

• +90

 » 6 years ago, # |   0 how and when can I be sure that I am registered for the contest ??
•  » » 6 years ago, # ^ |   +3 about 18 hours before the round , you can find the registration link , in contest page.
•  » » » 6 years ago, # ^ |   -6 thanks
•  » » 6 years ago, # ^ |   +3 Hi . first login then Go to the hereand see your name and all registerant or goto the here see your name and friend name if your name is be there your register . Excuse me for my bad writing .
 » 6 years ago, # |   -41 The Div.1 participants will be rated???
•  » » 6 years ago, # ^ |   +43 Are you a Div.1 participant !? :))
•  » » » 6 years ago, # ^ |   -12 hehe...No..U can know through the color of my name...
•  » » » » 6 years ago, # ^ |   0 Just Kidding!! :D
•  » » » » 6 years ago, # ^ |   -14
•  » » 6 years ago, # ^ |   +1 No. Codeforces Round #195 (Div. 2)
 » 6 years ago, # |   +6 i think this contest should be "Eid Special" :)
•  » » 6 years ago, # ^ |   -14 hhhhhhhhhhhhhhh (y)
•  » » » 6 years ago, # ^ |   -17 salam bro :)
•  » » » 6 years ago, # ^ |   -25 hhhhhhhhhhhh==heheheheehehehehehehe???
•  » » 6 years ago, # ^ |   0 happy feast to all muslims :)
 » 6 years ago, # |   +21 I hope a non-russian-speaking person had the chance to proofread the problem statements
 » 6 years ago, # |   +20 Ans scoring system ???
 » 6 years ago, # | ← Rev. 2 →   +21 Scoring system will be announced laterLater means after the contest ?
 » 6 years ago, # | ← Rev. 3 →   -9 edited
 » 6 years ago, # |   0 The website is too busy... terrible T T
 » 6 years ago, # |   +20 boring problem set, specially problem B :-| Really miss interesting problems on CF
 » 6 years ago, # |   +18 For some reason when we have only div2 rounds they are much harder than when we have both div1 and div2 rounds.I wonder why this is the case.
•  » » 6 years ago, # ^ |   -13 During the last year, there were a lot of div2 contests where I managed to solve all the five problems. However, solving A-B-C in div1 contest was a rare thing for me.
•  » » 6 years ago, # ^ |   +1 http://codeforces.com/blog/entry/8424#comment-142084This one follows the rules too!
 » 6 years ago, # |   0 any further explanation for problem C ?? .. i think it's not clear atleast for me :D
 » 6 years ago, # | ← Rev. 2 →   +12 dirty problemset :| [kaCf]
 » 6 years ago, # | ← Rev. 4 →   -8 I enjoyed this problemset, though most people probably don't like tricky cases.Edit : Express your opinion and get downvoted. Communism for the win.
 » 6 years ago, # |   +13 Problems was bad! But Thanks for fast system testing!
•  » » 6 years ago, # ^ |   +3 Your avarar shows typical Div2 participant's face after this round ended I guess :) Cool problems, but a bit harder, than Div2 used to be
 » 6 years ago, # |   0 How fast the system testing!!
 » 6 years ago, # |   0 What's the solution for problem C? Thanks.
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 for every bit position (0 to 32), consider numbers in the array that have this bit set (= 1). Take bitwise and of all these numbers for each position i in [0,32), this takes O(32*n) time. Note that AND has "the more, the better" scenario, ie, for a particular v let set S be solution; if (v+1)th bit is set for a number N, then N \union S will also be a set with solution v. Using this, calculate above array. Now find maximum i 0<=i<32 such that the "bitwise and" calculated above has all bits 0 to i-1 unset (=0). This is the solution
•  » » 6 years ago, # ^ | ← Rev. 5 →   +5 Make 30 buckets (vectors) and if a number from array has i-th bit turned on (0 <= i < 30) put the number in i-th bucket.After that for each bucket calculate the bit-wise and of all the numbers in that bucket and if that sum is divisible by 2^i output all the numbers in that bucket and the size of the bucket, of course choose i to be as high as possible.Edit: got ninja'd by the user above me :D
•  » » 6 years ago, # ^ | ← Rev. 2 →   +1 same as c0d3junki3, but i use a builtin function named __builtin_ctz . It returns the number of trailing 0-bits in x, starting at the least significant bit position.(I think it's faster than %)
 » 6 years ago, # |   +2 Wow system test is so fast now...I like it. Problems are great, a little bit too much math though. Have enjoyed it. Thanks to authors!
 » 6 years ago, # | ← Rev. 2 →   -6 why this submission skipped???it's correct![submission:4249620] please help!
 » 6 years ago, # |   +5 I think there is something wrong in the description of the problem C. I wonder how to understand this sentence in problem C: "If such number v doesn't exist (that is, for any non-negative integer v, number b1 and b2 and ... and bk is divisible by 2v without a remainder), " if v doesn't exit,number b1 and b2...and bk is divisible by 2^v should with a remainder,am I right?
•  » » 6 years ago, # ^ |   0 meaning if bitwise and is zero, then v can be as large as you want. In this case, answer is -1
•  » » » 6 years ago, # ^ |   0 thanks,i get it.
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 if b1&b2&...&bk == 0 it divides to all 2^v, and we don't have maximum v
•  » » » 6 years ago, # ^ |   0 yes,so there must be a solution.
•  » » 6 years ago, # ^ |   +1 Really, all this sentence is saying is that the number (b1 and b2 and ... and bk) should not be 0. If it was 0, it would be divisibly by 2v for any non-negative integer v.It was hard to understand though. I wish they just said "(b1 and b2 and ... and bk) should not be 0".
•  » » » 6 years ago, # ^ |   0 thanks for your explain:)
 » 6 years ago, # |   0 why not make a scoring board for Div.2 only without the out of competition participants ? To know your real ranking during the contest
•  » » 6 years ago, # ^ |   +8 you can unchecklist "show unofficial" :|
•  » » 6 years ago, # ^ |   +5 In top right corner of scoreboard is checkbox "show unofficial". Just uncheck it and you've got it :)
•  » » 6 years ago, # ^ |   +5 You can see the Div. 2 only scoreboard by unchecking the "show unofficial" checkbox in the top right corner
•  » » 6 years ago, # ^ | ← Rev. 2 →   +5 Click that "show unofficial" checkbox (in particular, untick it).EDIT: TOO MANY SNIPES
 » 6 years ago, # |   0 Is there a problem with the contest list? round 196(div 1) is 4 days later than round 196(div 2)!
 » 6 years ago, # |   +1 For problem A, if you see sample test 1, input: 10 5 output : 0 15 15 0 But how about 0 9 23 0 ? The conditions are still held, moreover its area is smaller. What would you say?
•  » » 6 years ago, # ^ |   +2 Oh, it's my bad. I thought "isosceles" is right angle because it was written as "isosceles(
•  » » 6 years ago, # ^ |   +2 The triangle must be isosceles which means that the two sides are equal in length.
 » 6 years ago, # |   -21 why this submission skipped???it's correct![submission:4249620] please help!during the contest this submission had accept!why now is skipped??:(
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 Maybe, You submit the same code with another handle.
•  » » » 6 years ago, # ^ |   -29 well,i have 2 account!and i submit for them!:|
•  » » » » 6 years ago, # ^ |   +16 Yeah! But it's against the rules of Codeforces.
 » 6 years ago, # | ← Rev. 2 →   0 Whats wrong with this solution? C WA6http://codeforces.com/contest/336/submission/4257324actually my beauty is 29 :|
•  » » 6 years ago, # ^ |   +1 I've got the same question. My solution write beauty 29 too.
•  » » 6 years ago, # ^ |   0 The beauty of your answer is 21 not 29, the remainder with 2^29 is not 0.
•  » » » 6 years ago, # ^ |   0 I was thinking why they are telling their solution's beauty is 29 instead of 21!
•  » » 6 years ago, # ^ |   0 Note that if you claim the beauty to be 29, then the AND of all numbers you pick must be divisible by 229. In your case, the AND of all numbers you pick is actually 229 + 221, which means it's not evenly divisible by 229. (The actual beauty in this case is 21; 229 + 221 is divisible by 221 (giving a quotient of 28 + 20 = 257).)I suppose you misunderstand the problem.
•  » » 6 years ago, # ^ |   0 Did you find out what's wrong with that ur approach? Now even i'm curious..
 » 6 years ago, # |   0 If I registered and didn't attempt any problem, will my rating be calculated.??
•  » » 6 years ago, # ^ |   +1 no
•  » » 6 years ago, # ^ |   0 not at all
 » 6 years ago, # |   +1 ABCE's name is "Vasily the Bear .."and D's name is "Bear Vasily" What's the point?
•  » » 6 years ago, # ^ |   +10 The problem title might be limited at either 35 or 36 characters; "Vasily the Bear" for D causes the problem title to go to 37 characters. (The next longest is E at 35 characters.)
•  » » » 6 years ago, # ^ |   0 I'm not sure about what you say! For example problem 319C's name is "Kalila and Dimna in the Logging Industry" which has a length of 40!"Bear Vasily and Beautiful Strings" can change to "Vasily the Bear and Beautiful Strings" which has a length of 37. (37 < 40) ! Maybe it has another reason!
 » 6 years ago, # |   +10 Can anyone tell me, why was this round JUST AND JUST geometry?!
•  » » 6 years ago, # ^ |   0 C and D are not !
•  » » 6 years ago, # ^ |   0 nope Pedrams
 » 6 years ago, # |   0 Quick question...On 336b, the one with the circles and the ant, I am getting a different answer when I run my code than what the tester is getting. I'm using python 2.7, and when I enter 2 2 for the second test, I get 5.41421356237 in my python interpreter, but the tester is getting 7.41421356237 when it runs my code. Does anyone know why this is happening? I did not import any external libraries and all my code is pretty standard...
•  » » 6 years ago, # ^ |   +5 Even when computing manually (by hand, not by an interpreter), I got 7.414 as your output. Are you sure you didn't misread 5 as 7?
•  » » » 6 years ago, # ^ |   0 Oh, whoops...I edited one file and submitted a different one xD Sorry about that
 » 6 years ago, # |   0 Why the rating not change?sorry for my bad English
•  » » 6 years ago, # ^ |   -16 your english is okay enough
 » 6 years ago, # | ← Rev. 2 →   0 deleted. was about repeated topic
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 yes its a solution but its not max v :D
•  » » 6 years ago, # ^ |   +1 The beauty of such sequence is -1 according to the problem statement
 » 6 years ago, # |   0 when will rating change?
•  » » 6 years ago, # ^ |   0 have patience vidyut
•  » » 6 years ago, # ^ |   0 now the rateing is change
 » 6 years ago, # |   +12 codeforces is not bad
 » 6 years ago, # | ← Rev. 2 →   -11 I think gridnevvvit doesn't want to write the editorial of this contest!P.S: Ratings changed!!!
 » 6 years ago, # |   +19 Problem D is quite nice.
 » 6 years ago, # |   +3 Classic Contest
 » 6 years ago, # |   0 how to prove problem A in simple out 1 I think (0,10),(20,0) is more small than (0,15),(15,0)
•  » » 6 years ago, # ^ |   0 The triangle must be isosceles.
•  » » » 6 years ago, # ^ |   +2 ooo thx I am so stuipd.,,.
 » 6 years ago, # |   0 My first time facing a floating point problem on codeforces. The custom test case was outputting -0.0000 for all my answers on g++ 4.7 using printf. What is the reason for this ?
•  » » 6 years ago, # ^ |   0 Can you show a testcase where it doesn't work?
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 Sure. Here is the code : ( Problem C : http://codeforces.com/problemset/problem/336/B ) http://ideone.com/SxkStn Run it on any test case 2 2 or 1 1 The same code gave me AC on submitting using setprecision
•  » » » » 6 years ago, # ^ |   +1 You're right, there seems to be something wrong with GCC on Codeforces: even the following program #include using namespace std; int main() { printf("%Lf\n", 3.14L); } outputs -30329013470001650000000000000000000000000000.000000 instead of the correct answer.
•  » » » » » 6 years ago, # ^ |   0 I got wrong on Pretest 1 twice. So thankfully no negative points, but wasted 20 minutes to figure out was going on.
 » 6 years ago, # |   -7 solve problem a in a few minutes, and try to understand other problems for about 2h...
 » 6 years ago, # |   0 Sorry but I really can't hold it anymore. With all respect the way the problems are written is not clear at all. Well not all of them but some.
 » 6 years ago, # |   0 Geometry... /:)
 » 6 years ago, # |   0 thx