### GlebsHP's blog

By GlebsHP, 4 years ago, translation, ,

Hello, dear participants of Codeforces community!

Starting from Codeforces Round #327 I'll be the new coordinator and will manage preparation process for all regular Codeforces rounds and other contests held on this platform. I'll do my best to increase the quality of contests we offer you, though Zlobober already raised this bar high. Let's cheer him once again, for all the great job he had done!

Tomorrow round will be held using the problems of Moscow team olympiad for high-school students. Do not be tricked by the word "school" — there will be a gold medalist of IOI 2015 participating and some candidates to this year Russian IOI team, meaning the level of the problems will be appropriate. I am sure everyone will find an interesting problem to enjoy.

The problemset was prepared by the team of Moscow authors (list is incomplete): Zlobober, romanandreev, _meshanya_, wilwell, glebushka98, timgaripov, thefacetakt, haku, Lhic, Timus, Sender, sankear, iskhakovt, andrewgark, masterOK, StopKran, AleX leaded by your humble servant GlebsHP and the chairman of the jury Helen Andreeva.

Special thanks to Delinur for translation and stella_marine for correction.

Five problems will be offered in both divisions and the scoring distribution will be announced later (good traditions should live).

UPD. Round time. Please note that Russia is not changing the timezone this night, while about 100 countries do so. Be sure to check when round starts in your timezone!

UPD2. Please note, that the distribution motivates you to read all the problems! Div1.: 750-1000-1250-1750-2500 Div2.: 500-1000-1750-2000-2250

UPD3. The results and the editorial will be published later, after the closing ceremony of the official competition.

UPD4. The system testing is over, results are now final. Feel free to upsolve and read other contestants code. Congratulations to Div. 1 top-5:

UPD5. Problem analysis is now available.

• +522

 » 4 years ago, # |   +2 Nice... :/ A school contest that lots of students can't join in it...Cause we are at school that time :/
•  » » 4 years ago, # ^ |   +9 Your profile picture is dank my friend.
•  » » 4 years ago, # ^ |   +74 On Sunday o_0?
•  » » » 4 years ago, # ^ |   +7
•  » » » 4 years ago, # ^ |   +68 Schools are open Sunday in Iran.
•  » » » » 4 years ago, # ^ |   +6 TIL
•  » » » » 4 years ago, # ^ |   0 Is Friday the only day of the weekend? I hear it also used to be so here in Turkey back in the day.
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   0 in Egypt also schools are open in sunday
 » 4 years ago, # |   0 Good luck!
 » 4 years ago, # |   0 Scoring distribution?Also, gotta love weekend contests. ;)
 » 4 years ago, # |   +25 What's the duration of the round? It is 2 hours on the list of upcoming contests, but the email says it will be 2.5 hours.
•  » » 4 years ago, # ^ |   +4 My bet — somebody forgot to change contest duration in that email, and 2.5 stays from previous round :)
 » 4 years ago, # |   +154 Welcome aboard! Great deeds await us.
 » 4 years ago, # |   +47 Good luck GlebsHP and Good Job dalex !
•  » » 4 years ago, # ^ |   +15 It will be good job if I bring back my yellow.Actually I'm surprised that nobody noticed that, I was just looking through recent actions and saw that Gleb had edited Mike's blog...
 » 4 years ago, # |   +3 Now zlobober will enter the contribution list. BOOM straight to the top.
•  » » 4 years ago, # ^ |   -8 I think that he will not enter the list for awhile
 » 4 years ago, # |   -11 I realise that number of contest that made in this time increase why??? some of us have school and others have a work some times i missed lectures to enter the contest i think it is good to make it around 7 , 8 o'clock after finishing our work in order not to be busy
•  » » 4 years ago, # ^ |   +2 Tomorrow round will be held using the problems of Moscow team olympiad for high-school students.Obviously, at the same time.
•  » » » 4 years ago, # ^ |   0 thanks for clarification I think that the contest made by codeforces XD
 » 4 years ago, # |   -10 How come AleX's contribution be minus when all his blogs and comments got no downvotes?
•  » » 4 years ago, # ^ |   -10 Some of his comments in Russian got negative votes.But I still think it's unreasonable because most of them got positive votes.
•  » » » 4 years ago, # ^ |   -7 Sorry, I just know that comments in Russian won't show in the English format. Thanks for the answer.
•  » » 4 years ago, # ^ |   0 Maybe he deleted some of his blogs...
•  » » 4 years ago, # ^ |   0 http://codeforces.com/blog/entry/8963 I think this explain why
 » 4 years ago, # |   +4 Heartily Welcome & All d Best GlebsHPThank you Zlobober for the great job u have done! :-)
 » 4 years ago, # |   -7 Now it is time to rest,but start to brain storming. Good Luck for every one.
 » 4 years ago, # |   +6 very long questions :(
 » 4 years ago, # |   -22 Omg it started on 9AM not on 10AM local time.
 » 4 years ago, # |   +139 After Mathematics and Physics problems in codeforces rounds...coming soon: chemistry problems in codeforces
•  » » 4 years ago, # ^ |   0 I hate math and physics problems too but the one about Chip and Dale is easily solvable by binary search + calculating distance between two points.
•  » » » 4 years ago, # ^ |   0 I had to solve triangle using cosine theorem and then use ternary search (search for minimum of function). Does the problem have simplier solution?
•  » » » » 4 years ago, # ^ |   +19 Here is my solution:if it is possible to reach to the destination point at some time T1, then it is possible to reach there for any T2 > T1, since you can just stay where you are (you are always faster than wind so it can't force you to leave your position). So with binary search you just have to check whether it is possible to reach the destination in exactly T seconds. To check that at first calculate the position to which wind will bring you if you will not move at all and then check whether you can get to destination from that point in T seconds (sqrt(dx * dx + dy * dy) <= T * u).
•  » » » » » 4 years ago, # ^ |   +3 LOL, me so noob %)I've solved the triangle and found O(1) solution for the case wind doesn't change, and then used search among angles of movement before wind changes :)Also, I'm quite sure, that it is possible to find O(1) solution for whole problem, but it requires mad_math_skillz*long_time
•  » » » » » » 4 years ago, # ^ | ← Rev. 2 →   0 Also my current solution gives information about direction to fly before and after wind changes. It would be pretty if problem required it in output %)btw, thank you, aram90
•  » » » » » » 4 years ago, # ^ | ← Rev. 8 →   0 I'm pretty sure I have an O(1) solution. Coded after the end of the contest, working for the samples. Waiting to be able to submit it. Anyway, the idea:First solve it without wind change. Basically, you need to set your direction so that your net velocity points straight to the target. If you draw some vectors, you'll see that you have two sides and the angle opposing the longer sides in a triangle and you need to figure out the third one. As sur said, you can do this with the cosine theorem (or you can forget easy solutions and instead find the intersection of a circle and a line like me...).If solving this for the first wind velocity results in a time needed that is greater than the given T, you know you'll reach the target after the wind change.For this case, consider a coordinate system "fixed to the air", i.e. consider a system where the wind's effect is replaced by the goal point moving in the direction opposing the wind's velocity. Now look at the path of the goal point. Before time T, it's moving with some velocity, reaches some point, then changes its velocity, and somewhere after this change is the time when you can reach it.But at this point, the weird movements at the start don't really matter. It's the second movement you want to calculate with. But it only starts this after T. So how do you make it simpler? You pretend that it was moving in the same straight line before T. So you move the goal position by the distance it would cover with the first velocity until T, then "wind back the clock", pretending it had the SECOND velocity all along. You set the goal position to this new point. Take care when considering the direction of the wind, its opposite, and subtraction of the opposite... If you have the V and W vectors as given in the input, and G goal position, its new position is G + (T*-V) — (T*-W) = G + T*(W-V).This problem will be equivalent to the original, because if you consider it as the "goal point moving", it's in the same position at the same time when you can reach it. And now you can solve it with the previous method.
•  » » » » » » 4 years ago, # ^ | ← Rev. 3 →   +9 And yup, got AC for O(1) after some debugging: 13860359Solving it for no wind change by intersecting a circle and a line using an ugly quadratic equation. The interesting part is the rest — modifying the parameters to find the intersection when the wind does change as described in the long comment.
•  » » » » » 4 years ago, # ^ |   0 Lovely soln :)
•  » » » 4 years ago, # ^ |   -10 Please tell me how. My binary search solution have got WA on pretest 4.
•  » » 4 years ago, # ^ | ← Rev. 3 →   -10 Cool, looking forward to it.
•  » » 4 years ago, # ^ |   0 Chip has two recessive genes for blue eyes and Dale has heterozygous brown eyes. Meanwhile Dale has the gene that makes it impossible to roll his tongue on the same chromosome. Dale and Chip have a litter of little rodents together. Take as input the name of their baby chipmunks and the probability of DNA crossing over during meiosis. Give as output the chances that a mutation in any given codon will switch an amino acid and give the baby chipmunks purple fur.
 » 4 years ago, # | ← Rev. 2 →   +13 Div2 B was exactly same problem came in ACM ICPC Dhaka Regional 2014. That's why people from Bangladesh could solve it earlier.However, Problem set was very much enjoyable! Thanks to the setters! :)
•  » » 4 years ago, # ^ |   0 hahaha !! that's right !!! the only difference was we had to replaces a with b in ICPC Dhaka regional 2014 and today we had to swap.
•  » » » 4 years ago, # ^ |   0 This swap is equivalent to two replace. So, it has no difference except doubling the number of query.
•  » » » » 4 years ago, # ^ |   0 :Pyep
•  » » 4 years ago, # ^ |   0 Does it actually matter?If the problem was C/D then it would matter.I think none of the coders could use their previous code.And problem B is never that much difficult.So it doesn't effect that much because most of the coders who can solve B always they will take just few minutes to solve it.
 » 4 years ago, # |   0 well, I got really stuck on that Div2 C.... Probably sohuld have just started to solve next problems
 » 4 years ago, # |   -11 Div 2 B WA in pretest1?
•  » » 4 years ago, # ^ |   0 I solved it with O(26*m+n) complexity...Here is my code... Div 2 327 B
•  » » » 4 years ago, # ^ |   0 Thanks Mayank! Elegant solution. :)
 » 4 years ago, # | ← Rev. 2 →   -13 C has very weak pretests 3 3 1.2 1.2 333 Is a nightmare.
•  » » 4 years ago, # ^ | ← Rev. 2 →   +5 I thought the nightmare was something like: 3 3 1.. ..2 3.. 
•  » » » 4 years ago, # ^ |   +6 Those are the easy cases for the correct solution. The tricky corner cases are when the 3 paths intersect on a tile such that it contains '1', '2' or '3'.
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   +25 Isn't there just two cases?:— Connect any 2 pairs of components with shortest routes— Connect all 3 components to the same free cell with shortest routes
•  » » 4 years ago, # ^ |   0 The answer is 0.right?
•  » » » 4 years ago, # ^ |   +5 Right, I had to resubmit twice due to this case (my solution was printing 1).
•  » » 4 years ago, # ^ |   +1 Oh come on, I said to myself "I will handle the 0-case at the very end", and forgot it, of course. Nightmare.
•  » » 4 years ago, # ^ |   +11 "It is guaranteed that initially it is possible to reach any cell of any state from any cell of this state, moving only along its cells."
•  » » » 4 years ago, # ^ |   -6 I hacked with this test, so it must be according to the statement. And my common sense tells me it obeys what you said as well.
•  » » » » 4 years ago, # ^ |   +3 Ohh never mind, I thought the two 3s on the top were part of the map, sorry.
 » 4 years ago, # |   +18 Not sure if I'm the only one who didn't like the problems :)
•  » » 4 years ago, # ^ |   +10 Pretty sure you're not alone. I don't like it either but that's just because they are quite difficult for me. The problemset itself is quite nice.
•  » » » 4 years ago, # ^ |   -16 My C also failed the system tests.. now I totally hate the problemset :P
 » 4 years ago, # |   +5 How to solve Div. 2 C?
•  » » 4 years ago, # ^ |   -60 by coding of course
•  » » » 4 years ago, # ^ |   0 Brilliant sir
•  » » 4 years ago, # ^ | ← Rev. 4 →   +1 My solution was based on the following observations: a_0 and a_n are always stable. b_i = a_i if at least one of the adjacent values is the same as a_i. Consequently, b_i = 1 — a_i if both of the adjacent values are different (for i in [2,n-1]). Moreover, a_i will be stable if it is part of a continuous subsequence of the same values. Let A be the string of values given. In this string, there exist at least two stable values (namely the end points). Let S be a substring of A such that the end points (p and q) of S are the only stable points in it. Without loss of generality, assume that p = 1. Then, the substring S' formed by removing the these two points must be alternating (either of the form 0101...0101 when q = 0, or 0101...010 when q = 1 ). In the first case, S' will eventually become 1111...111 as consequence of the previous observation. In the second case, S' will become 111...000, where the amount of 1's and 0's are the same.
•  » » » 4 years ago, # ^ |   0 I almost did the same.But i don't understand why i got WA in pretest 6.Can you check what did i miss here? My Code By the way,is there any case for which the answer will be -1 ?I didn't find anyone!
•  » » » » 4 years ago, # ^ |   0 It can't be -1 , others have proved it.
•  » » » » 4 years ago, # ^ |   0 Try this test case: 4 0 1 0 1The answer should be 1 0 0 1 1
•  » » » » » 4 years ago, # ^ |   0 yes
•  » » 4 years ago, # ^ |   0 The longest alternating sequence is the answer. If it starts and ends in same digit, then every digit in between becomes that digit. Else, if it starts and ends in different digit, then there are equal numbers of 0's and 1's serially.
•  » » 4 years ago, # ^ |   +3 Basically there are stable and unstable intervals. If anywhere in the segment you find 00 or 11, then they are not going to change, but any segment such as 010 or 101010 is going to change, depending on what stable intervals they are surrounded by.Finding the intervals is a nice application of regular expressions, segs = re.findall('(.*?)(0{2,}|1{2,})', s) This splits something like 110010101110100 (I added doubled the ending coordinates, as they are stable too) into [('', '11'), ('', '00'), ('1010', '111'), ('01', '00')]. From there you just have to change the unstable '1010' into '0011' and '01' into '10' and you're done.
•  » » » 4 years ago, # ^ |   +1 ..and another way with regexes using lookaround: if repetition "1 - NUMBER_1, NUMBER_1"+ is surrounded with "NUMBER_1,NUMBER_1" from left and with "NUMBER_2" from right, then it changes to "NUMBER_1" * (length_of_repetition / 2) + "NUMBER_2" * (length_of_repetition / 2). e.g. 13873903
 » 4 years ago, # |   +11 For Div2 D can anyone show me how sample case #2 works? Cant understand how 11.547005383792516398 come out. I think it should be 20/sqrt(3);
•  » » 4 years ago, # ^ |   +13 20/sqrt(3) is 11.547005383792516398, isn't it? :P https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=20%2Fsqrt(3)
•  » » » 4 years ago, # ^ |   +7 wtf im so noob :( my mental calculation become worse and worse after high school
 » 4 years ago, # |   0 I think we will see a lot of WA on the fourth task.
 » 4 years ago, # |   0 Div2 C....I thought its my lucky day when reading till second last paragraph of a problem
•  » » 4 years ago, # ^ |   0 Haha me too :P
•  » » » 4 years ago, # ^ |   +9 Can you find any case that answer "-1"?I puzzled it for a long time
•  » » » » 4 years ago, # ^ |   0 My solution without "-1" case was accepted on pretests. Final sequence always exists.
•  » » » » » 4 years ago, # ^ |   0 Thanks
•  » » » » » 4 years ago, # ^ | ← Rev. 2 →   +8 You shouldn't consider that fact a proof.
•  » » » » » » 4 years ago, # ^ |   +3 I ran my slow solution for all binary sequences from 0 to 2^20, not a single one got stuck. Enough of a proof?
•  » » » » » » » 4 years ago, # ^ |   +5 Of course it is not enough for a proof, it may work to feel save in the middle of a contest, but it wasn't a demonstration at all. BTW, the proof is not hard.
 » 4 years ago, # |   +14 Thank you very much!This is my first contest in CF.I really have a happy time!Expect next contest!
 » 4 years ago, # |   +64 When will the closing ceremony finish?
•  » » 4 years ago, # ^ |   +1 Yeah I too is waiting for Editorials.Please feed us with editorials so that I can go back to sleep!
 » 4 years ago, # |   -11 Why Div.1C is C ?
•  » » 4 years ago, # ^ |   -10 Why in the previous contest div1 D was D?
•  » » 4 years ago, # ^ |   +19 why "why" is why ?
 » 4 years ago, # |   +5 problem c ,, div 2 , when the answer would be "-1" ,, i think there is no possible case where the answer is "-1" ,, is it ?!!
•  » » 4 years ago, # ^ |   0 I puzzled it too
•  » » 4 years ago, # ^ |   +4 The answer is never "-1". It can be shown easily by induction (a1 never changes, and if numbers a1, ... ak never change after k steps, then ak + 1 cannot change after k + 1 steps).
 » 4 years ago, # |   -11 When is the closing ceremony of the official competition? (How many hrs from now?)
 » 4 years ago, # |   -11 How to solve Div2 C other than simulating?
•  » » 4 years ago, # ^ |   +6 Notice that any substring containing more than one consecutive zeroes/ones will remain as it is, so the only case we have to think about is 10101... If you notice carefully, after each move the leftmost and the rightmost digit of this substring will become safe (it will become equal to whatever is beyond it), so you can easily come up with a O(N) solution. So we just have to update cnt as max(cnt,(length of unsafe substring+1)/2))
 » 4 years ago, # |   +7 Div-2 C >>>> The Great Wall Of China..(for my rating) :-( When can I cross it?
•  » » 4 years ago, # ^ |   0 Hey decoder123 check you inbox
 » 4 years ago, # |   0 Looking at the hacks, looks like DIV2D / DIV1B will give many WAs..What was the hack that dreamoon used four times?
•  » » 4 years ago, # ^ |   0 I think many competitors didn't consider, that tau-corss-shape road may be shorter, than two roads connecting two pair of countries
•  » » » 4 years ago, # ^ |   0 Oops, sorry, my comment applies to Div2E/Div1C
•  » » 4 years ago, # ^ | ← Rev. 3 →   +37 If you write something like while(hi-lo > 1e-9) and using variable with double, or you set hi < 5e7, you will fail in following testcase:10000 10000 -6470 -10000969 1000616 748616 748
•  » » » 4 years ago, # ^ |   0 And what is the output of this test case?
•  » » » » 4 years ago, # ^ |   0 My program give 50211053.368784316000000000.
•  » » » 4 years ago, # ^ |   -10 O.o? Why does while(hi-lo > 1e-9) break? Does it time out?
•  » » » 4 years ago, # ^ |   0 What is wrong with while(hi-lo > 1e-9), exactly? I used long double there.
•  » » » » 4 years ago, # ^ |   0 I guess long double will pass it.
•  » » » » » 4 years ago, # ^ | ← Rev. 4 →   0 I have used float..should I expect a WA? UPD: I have used double..I forgot..got AC
•  » » » » » » 4 years ago, # ^ |   0 Yes.
•  » » » » » » 4 years ago, # ^ |   -7 Of course. I believe we should never use float.
•  » » » 4 years ago, # ^ |   +21 precision killed me...
 » 4 years ago, # |   -12 Tasks were ok, the idea for the second is pretty standard, the third task is cool, the fourth is good, but I couldn't solve it on the time. The fifth task I didn't understand.But the texts were awful. In the first task we have one not important part, in the thrid task the main thing wasn't on the right place ( ai=0 or ai=1) and samples in the fifth task weren't explaned...Thank you for the contest GlebsHP, I am waiting your new round !
 » 4 years ago, # |   0 I solved Div2 A and Div2 C easily, but for some reason I had quite a lot of trouble with Div2 B. The only way I could think of in the end was to keep swapping integer arrays to denote swap of two letters. Does anyone have a better way ?
•  » » 4 years ago, # ^ |   0 How do you solved Div2 C?
•  » » » 4 years ago, # ^ |   0 You have to find all alternating sequences. The longest alternating sequence will provide the first answer. My algorithm is based on the followings:1) If the alternating sequence has odd length , then the sequence has same bits on both the side (You can easily prove how). So this sequence will eventually be consumed by those bits to become stable. 2) If this sequence has even length , then the sequence has different bits in each side (Again, the proof is easy). First half of the sequence will be consumed by the bit on the left and the second half will be consumed by the bit on the right. 3) Step required is ceil(length/2). The answer is the maximum of them.Solution passed the pretests. I am a little bit worried about the -1 case though. I am pretty sure this case doesn't exist. But I couldn't prove it.
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   +1 yeah, passed system test. So -1 case doesn't exist (Proved) :v 8-)
•  » » 4 years ago, # ^ | ← Rev. 3 →   0 You can make temporary mapping array 'a' -> 'a' ... 'z' -> 'z', simulate on it for O(26*m) and apply it to string for O(n)
•  » » 4 years ago, # ^ |   0 you can use a array f[] to store the letter's meanings.and for every swap operation , you can updata your f[] array in O(26) Time.
•  » » » 4 years ago, # ^ |   -19 Please use update instead of "updata". There is no such word.
•  » » » 4 years ago, # ^ |   -23 Besides, I don't like your avatar.
•  » » » » 4 years ago, # ^ |   -15 Me neither.
•  » » » 4 years ago, # ^ |   0
 » 4 years ago, # |   +37 How long till the closing ceremony?
•  » » 4 years ago, # ^ |   0 Results will be approximately at the 19:17 GMT+3 25.10.2015
•  » » » 4 years ago, # ^ |   0 Really?How did you know?
 » 4 years ago, # |   0 Great problems ! I would have loved to spend more time solving problem D during the contest, lost so much time to understand that I needed "cin.ignore()" in problem B :(Thanks for the contest.
 » 4 years ago, # |   +9 At least are we going to be allowed to check others submission's ??
 » 4 years ago, # |   +25 Is there any information on when the closing ceremony will finish?
 » 4 years ago, # |   +76 A round announcement without thanking MikeMirzayanov :D
 » 4 years ago, # | ← Rev. 2 →   +25 Why should we wait with the results until the closing ceremony's end?
•  » » 4 years ago, # ^ |   0 This is to keep up the excitement of the on site contestant until the declaration of the winner names at closing ceremony.
 » 4 years ago, # |   +13
•  » » 4 years ago, # ^ |   0 *Pending system testing
•  » » 4 years ago, # ^ |   0 More than 1 hour and even system testing not started. So, how its 1 hour rating system :P
 » 4 years ago, # |   0 When the closing ceremony will end ?? :(
 » 4 years ago, # |   +9 No sign of closing the closing ceremony.
 » 4 years ago, # | ← Rev. 3 →   0 What is wrong with Div 2 B solution? Both fail on testcase 1.Brute force — https://ideone.com/YvASbz Runtime Error — https://ideone.com/cy83S0
 » 4 years ago, # |   -16 Do you start the testing?
 » 4 years ago, # |   -16 what's happen in the codeforces??
 » 4 years ago, # | ← Rev. 2 →   +1 Why kill the time? plz start the system testing. Every one waiting for system testing.
•  » » 4 years ago, # ^ |   +5 I think it is because of the onsite events. They cannot start system test now. If they did, there would not be much fun in the closing ceremony(or something like this).
 » 4 years ago, # |   +6 Please notify us with any comments. What causes this delay?
•  » » 4 years ago, # ^ |   +2 UPD3. The results and the editorial will be published later, after the closing ceremony of the official competition
 » 4 years ago, # |   +14 Seems like contest is not of 2 hours but of entire day ;)
 » 4 years ago, # |   +14
 » 4 years ago, # |   +14 System testing started. Feeling emotional :P
 » 4 years ago, # |   +10 Finally system testing started !!!! -_- :D
 » 4 years ago, # |   +1 why TLE?
 » 4 years ago, # | ← Rev. 2 →   +58 System testing finished but practice mode is not enabled! Why?UPD. It's now fixed.
 » 4 years ago, # |   0 still not able to see testcases and submissions :(
 » 4 years ago, # |   -7 Why is there so much delay? 1. there was delay in testing 2. now practice mode is not enabled 3. there is no editorial uptil now. 4. I can't see other's submissions.(What is the point of making submissions invisible until system testing is over) Please do it quickly.
•  » » 4 years ago, # ^ | ← Rev. 2 →   +15 5)Rating has not changed yet
 » 4 years ago, # |   +9 Was worried about plateauing for a while but it seems like I'm still improving!
 » 4 years ago, # | ← Rev. 2 →   +27 Feel free to upsolve and read other contestants code. Yes, i'm feel free while the others codes are blocked <3
 » 4 years ago, # |   0 I am a Div 2 participant. My submission for question 1 was processed by the server twice. Hence there were two submission both at the same timestamp. Also, I was penalised 50 points as resubmission. Why did this happen? Can something be done regarding this?
 » 4 years ago, # |   +1 Why rating change is so delayed ??
 » 4 years ago, # | ← Rev. 2 →   +6 UPD4: ............ Congratulations to Div. 1 top-5 Why only Div. 1 winners ? What about Div. 2 winners (or top 5) ??
 » 4 years ago, # |   0 Is this round even rated ? !
•  » » 4 years ago, # ^ |   +2 Ah i wish it is unrated. :-P
•  » » 4 years ago, # ^ |   0 Hope it too.
 » 4 years ago, # |   +9 UPD4. The system testing is over, results are now final. Feel free to upsolve and read other contestants code. Congratulations to Div. 1 top-5:How?
•  » » 4 years ago, # ^ | ← Rev. 7 →   0 .
•  » » 4 years ago, # ^ | ← Rev. 2 →   +10 By asking the other contestant to share his/her code via ideone (feel free to ask them to share their codes :P )
•  » » » 4 years ago, # ^ |   0 Then how can we see the test cases? :D
•  » » » » 4 years ago, # ^ |   +18 who told you to feel free to see the test cases? :D
 » 4 years ago, # |   +9 Still unable to "read other contestants code"
•  » » 4 years ago, # ^ |   +4 "I give you A you give me B"... this won't be considered as cheating now :P
 » 4 years ago, # |   +60 Rating — time limit exceeded.
 » 4 years ago, # |   +6 these people have no idea what theyre doing
 » 4 years ago, # |   0 Was this round rated? Or is the rating change delayed for some reason?
•  » » 4 years ago, # ^ |   0 I have been starting to wonder the same thing. And it was my first time solving C too :/
•  » » » 4 years ago, # ^ |   +1 well this problem C was the only problem C in these recent contest which needed a bit of thinking :) others were just brute force and corner cases (we call it tof in persian )
•  » » » » 4 years ago, # ^ |   0 Actually, I need to rephrase. It was my first time solving 3 problems. And yes, I think you are right. In some of the previous contests, I somehow found B harder than C.
 » 4 years ago, # |   +34
•  » » 4 years ago, # ^ |   +6 lol be happy u still have some coffee mine is finished :/
•  » » 4 years ago, # ^ |   +3 Editorial?
•  » » 4 years ago, # ^ |   +1 *waiting(irony of a meme: there is no edit option to correct spelling or grammar)
 » 4 years ago, # |   +13 We can't "read other contestant's code" yet GlebsHP :P
 » 4 years ago, # |   +1 Atleast make the testcases public. Can't wait to see where i went wrong in Div2 C.
•  » » 4 years ago, # ^ |   0 try this :) 101010
•  » » » 4 years ago, # ^ |   0 Getting output:- 2 111000
•  » » » » 4 years ago, # ^ |   0 correct try this 5 1 0 1 0 1 and 5 0 1 0 1 0 and 5 0 1 0 1 1
•  » » » » » 4 years ago, # ^ |   0 2 1 1 1 1 1 2 0 0 0 0 0 1 0 0 1 1 1
•  » » » » » » 4 years ago, # ^ |   0 correct ! I have no idea then :) what is the order of ur algorithm ?
•  » » » » » » » 4 years ago, # ^ |   0 It's O(n) Finally found out the mistake. Implemented it in the wrong way. Thanks for your help.
•  » » » » » » » » 4 years ago, # ^ |   0 ur welcome
 » 4 years ago, # | ← Rev. 2 →   +43 I am quite disappointed in today's problemset, especially since there was like 20 people involved in preparing the contest. For me ideas for B, C, D are quite old and standard (and I'm guessing many people feel the same way, as there are 45 people passing all 4 problems, and much more passing pretests). And did authors know that D has observation that s < 6000? How can it worth 1750 points?
•  » » 4 years ago, # ^ |   +43 It is impossible to have five problems with new idea every round. What we try to achieve is to offer something new to everyone. The result is that for almost everyone there will too easy and too hard problems, but at least one problem will be the right challenge to his\her solve\write abilities. Problem E was your challenge yesterday.
 » 4 years ago, # |   -10 Zlobober back maybe ? :D
 » 4 years ago, # |   +230
 » 4 years ago, # |   +86 Looks like GlebsHP is counting rating manually :)
•  » » 4 years ago, # ^ |   +9 or maybe code that computes rating is like this: sleep(10 * 60 * 60 * 1000); //10 hours update_ratings(); 
 » 4 years ago, # |   +4 hi first thank GlebsHP for prepare The Contest, the problems are very nice and creative:) but system rating... :(
 » 4 years ago, # |   +3 For those interested, here is a much easier version of three states. http://www.usaco.org/index.php?page=viewproblem2&cpid=88
•  » » 4 years ago, # ^ |   0 The problem is very simple anyway :)) In my opinion, it was the easiest div1 problem from the contest
 » 4 years ago, # |   -17
 » 4 years ago, # |   0 Finally we can see submissions. I hope ratings will be updated soon. :)
 » 4 years ago, # |   -8 Never had such bad experience before. Everything seems messed up. :( system testing has finished 3.5 hours ago but, no rating change. Still can't see others code and test cases !!
•  » » 4 years ago, # ^ |   0 Now you can.
 » 4 years ago, # |   +6 They should change Codeforces' logo for this blog to something like
 » 4 years ago, # |   0 13849187 , what is wrong with this code? Why is the output blank? It runs fine on my compiler
•  » » 4 years ago, # ^ |   0
•  » » 4 years ago, # ^ |   0 Don't use gets(). Try it with cin.
•  » » 4 years ago, # ^ |   +11 Never use both c++ io and c io while you have closed the synchronization of them using "ios_base::sync_with_stdio(false)".
 » 4 years ago, # | ← Rev. 2 →   0 Finally rating change. o_o Waiting for saturday contest. :)
 » 4 years ago, # |   +16 waiting for solutions for the contest...
•  » » 4 years ago, # ^ |   +8 Editorial in Russian will be published in approximately 10 minutes. Unfortunately, English one will be published only tomorrow.
 » 4 years ago, # |   0 How to solve problem D? I used ternary search to find the best angle we have to move until time t and them go directly to destination. (or go to destination under t seconds). but my code couldn't even answer the first test case. here's my code http://codeforces.com/contest/591/submission/13852036
•  » » 4 years ago, # ^ | ← Rev. 2 →   +8 You don't have to care about the angle, all you need to care about is the time taken. Say that you're making a guess that the trip will take h seconds, and the other variables are as given in the problem statement. That means that during that trip you will be moved to the direction vx,vy for min(h,t) seconds and to the direction wx,wy for max(h-t,0) seconds. When you know this, you can move your starting position to x = vx*min(h,t) + max(h-t,0)*wx + x1 and y = vy*min(h,t) + max(h-t,0)*wy + y1 to compensate for the wind, and pretend there's no wind. Then you can just check whether you can get to the destination from your new starting position in h seconds. Now that you can check if the trip can be made in time h, you can just make a binary search.