GlebsHP's blog

By GlebsHP, 9 years ago, translation, In English

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, ipavlov, 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:

  1. Endagorion
  2. JoeyWheeler
  3. sdya
  4. RAD
  5. -XraY-

UPD5. Problem analysis is now available.

  • Vote: I like it
  • +522
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Nice... :/ A school contest that lots of students can't join in it...Cause we are at school that time :/

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck!

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Scoring distribution?

Also, gotta love weekend contests. ;)

»
9 years ago, # |
  Vote: I like it +25 Vote: I do not like it

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.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    My bet — somebody forgot to change contest duration in that email, and 2.5 stays from previous round :)

»
9 years ago, # |
  Vote: I like it +154 Vote: I do not like it

Welcome aboard! Great deeds await us.

»
9 years ago, # |
  Vote: I like it +47 Vote: I do not like it

Good luck GlebsHP

and Good Job dalex !

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    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...

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Now Zlobober will enter the contribution list. BOOM straight to the top.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    I think that he will not enter the list for awhile

»
9 years ago, # |
  Vote: I like it -11 Vote: I do not like it

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

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Tomorrow round will be held using the problems of Moscow team olympiad for high-school students.

    Obviously, at the same time.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      thanks for clarification I think that the contest made by codeforces XD

»
9 years ago, # |
  Vote: I like it -10 Vote: I do not like it

How come AleX's contribution be minus when all his blogs and comments got no downvotes?

»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Heartily Welcome & All d Best GlebsHP

Thank you Zlobober for the great job u have done! :-)

»
9 years ago, # |
  Vote: I like it -7 Vote: I do not like it

Now it is time to rest,but start to brain storming. Good Luck for every one.

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

very long questions :(

»
9 years ago, # |
  Vote: I like it -22 Vote: I do not like it

Omg it started on 9AM not on 10AM local time.

»
9 years ago, # |
  Vote: I like it +139 Vote: I do not like it

After Mathematics and Physics problems in codeforces rounds...

coming soon: chemistry problems in codeforces

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I had to solve triangle using cosine theorem and then use ternary search (search for minimum of function). Does the problem have simplier solution?

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it +19 Vote: I do not like it

        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).

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
            Vote: I like it +3 Vote: I do not like it

          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

          • »
            »
            »
            »
            »
            »
            9 years ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

            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

          • »
            »
            »
            »
            »
            »
            9 years ago, # ^ |
            Rev. 8   Vote: I like it 0 Vote: I do not like it

            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.

          • »
            »
            »
            »
            »
            »
            9 years ago, # ^ |
            Rev. 3   Vote: I like it +9 Vote: I do not like it

            And yup, got AC for O(1) after some debugging: 13860359

            Solving 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.

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Lovely soln :)

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it -10 Vote: I do not like it

      Please tell me how. My binary search solution have got WA on pretest 4.

  • »
    »
    9 years ago, # ^ |
    Rev. 3   Vote: I like it -10 Vote: I do not like it

    Cool, looking forward to it.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
9 years ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

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! :)

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      This swap is equivalent to two replace. So, it has no difference except doubling the number of query.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

well, I got really stuck on that Div2 C.... Probably sohuld have just started to solve next problems

»
9 years ago, # |
  Vote: I like it -11 Vote: I do not like it

Div 2 B WA in pretest1?

»
9 years ago, # |
Rev. 2   Vote: I like it -13 Vote: I do not like it

C has very weak pretests

3 3
1.2
1.2
333

Is a nightmare.

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    I thought the nightmare was something like:

    3 3
    1..
    ..2
    3..
    
    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      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'.

      • »
        »
        »
        »
        9 years ago, # ^ |
        Rev. 2   Vote: I like it +25 Vote: I do not like it

        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

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The answer is 0.right?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Right, I had to resubmit twice due to this case (my solution was printing 1).

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Oh come on, I said to myself "I will handle the 0-case at the very end", and forgot it, of course. Nightmare.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    "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."

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it -6 Vote: I do not like it

      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.

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Ohh never mind, I thought the two 3s on the top were part of the map, sorry.

»
9 years ago, # |
  Vote: I like it +18 Vote: I do not like it

Not sure if I'm the only one who didn't like the problems :)

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    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.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it -16 Vote: I do not like it

      My C also failed the system tests.. now I totally hate the problemset :P

»
9 years ago, # |
  Vote: I like it +5 Vote: I do not like it

How to solve Div. 2 C?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it -60 Vote: I do not like it

    by coding of course

  • »
    »
    9 years ago, # ^ |
    Rev. 4   Vote: I like it +1 Vote: I do not like it

    My solution was based on the following observations:

    1. a_0 and a_n are always stable.

    2. 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.

    3. 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.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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!

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Try this test case: 4 0 1 0 1

        The answer should be 1 0 0 1 1

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      ..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

»
9 years ago, # |
  Vote: I like it +11 Vote: I do not like it

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);

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I think we will see a lot of WA on the fourth task.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Div2 C....I thought its my lucky day when reading till second last paragraph of a problem

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Haha me too :P

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +9 Vote: I do not like it

      Can you find any case that answer "-1"?I puzzled it for a long time

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        My solution without "-1" case was accepted on pretests. Final sequence always exists.

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
          Rev. 2   Vote: I like it +8 Vote: I do not like it

          You shouldn't consider that fact a proof.

          • »
            »
            »
            »
            »
            »
            9 years ago, # ^ |
              Vote: I like it +3 Vote: I do not like it

            I ran my slow solution for all binary sequences from 0 to 2^20, not a single one got stuck. Enough of a proof?

            • »
              »
              »
              »
              »
              »
              »
              9 years ago, # ^ |
                Vote: I like it +5 Vote: I do not like it

              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.

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Thank you very much!This is my first contest in CF.I really have a happy time!Expect next contest!

»
9 years ago, # |
  Vote: I like it +64 Vote: I do not like it

When will the closing ceremony finish?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Yeah I too is waiting for Editorials.

    Please feed us with editorials so that I can go back to sleep!

»
9 years ago, # |
  Vote: I like it -11 Vote: I do not like it

Why Div.1C is C ?

»
9 years ago, # |
  Vote: I like it +5 Vote: I do not like it

problem c ,, div 2 , when the answer would be "-1" ,, i think there is no possible case where the answer is "-1" ,, is it ?!!

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    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).

»
9 years ago, # |
  Vote: I like it -11 Vote: I do not like it

When is the closing ceremony of the official competition? (How many hrs from now?)

»
9 years ago, # |
  Vote: I like it -11 Vote: I do not like it

How to solve Div2 C other than simulating?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    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))

»
9 years ago, # |
  Vote: I like it +7 Vote: I do not like it

Div-2 C >>>> The Great Wall Of China..(for my rating) :-( When can I cross it?

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Looking at the hacks, looks like DIV2D / DIV1B will give many WAs..

What was the hack that dreamoon_love_AA used four times?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think many competitors didn't consider, that tau-corss-shape road may be shorter, than two roads connecting two pair of countries

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Oops, sorry, my comment applies to Div2E/Div1C

  • »
    »
    9 years ago, # ^ |
    Rev. 3   Vote: I like it +37 Vote: I do not like it

    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 -10000

    969 1000

    616 748

    616 748

»
9 years ago, # |
  Vote: I like it -12 Vote: I do not like it

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 !

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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 ?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How do you solved Div2 C?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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.

      • »
        »
        »
        »
        9 years ago, # ^ |
        Rev. 2   Vote: I like it +1 Vote: I do not like it

        yeah, passed system test. So -1 case doesn't exist (Proved) :v 8-)

  • »
    »
    9 years ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    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)

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
9 years ago, # |
  Vote: I like it +37 Vote: I do not like it

How long till the closing ceremony?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Results will be approximately at the 19:17 GMT+3 25.10.2015

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

At least are we going to be allowed to check others submission's ??

»
9 years ago, # |
  Vote: I like it +25 Vote: I do not like it

Is there any information on when the closing ceremony will finish?

»
9 years ago, # |
  Vote: I like it +76 Vote: I do not like it

A round announcement without thanking MikeMirzayanov :D

»
9 years ago, # |
Rev. 2   Vote: I like it +25 Vote: I do not like it

Why should we wait with the results until the closing ceremony's end?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is to keep up the excitement of the on site contestant until the declaration of the winner names at closing ceremony.

»
9 years ago, # |
  Vote: I like it +13 Vote: I do not like it

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    *Pending system testing

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    More than 1 hour and even system testing not started. So, how its 1 hour rating system :P

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

When the closing ceremony will end ?? :(

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

No sign of closing the closing ceremony.

»
9 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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

»
9 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Why kill the time? plz start the system testing. Every one waiting for system testing.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    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).

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Please notify us with any comments. What causes this delay?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

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

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Seems like contest is not of 2 hours but of entire day ;)

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

System testing started. Feeling emotional :P

»
9 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Finally system testing started !!!! -_- :D

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

why TLE?

»
9 years ago, # |
Rev. 2   Vote: I like it +58 Vote: I do not like it

System testing finished but practice mode is not enabled! Why?

UPD. It's now fixed.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

still not able to see testcases and submissions :(

»
9 years ago, # |
  Vote: I like it -7 Vote: I do not like it

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.

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Was worried about plateauing for a while but it seems like I'm still improving!

»
9 years ago, # |
Rev. 2   Vote: I like it +27 Vote: I do not like it

Feel free to upsolve and read other contestants code. Yes, i'm feel free while the others codes are blocked <3

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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?

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Why rating change is so delayed ??

»
9 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it
UPD4: ............ Congratulations to Div. 1 top-5

Why only Div. 1 winners ? What about Div. 2 winners (or top 5) ??

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Is this round even rated ? !

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

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?

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Still unable to "read other contestants code"

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    "I give you A you give me B"... this won't be considered as cheating now :P

»
9 years ago, # |
  Vote: I like it +60 Vote: I do not like it

Rating — time limit exceeded.

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

these people have no idea what theyre doing

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Was this round rated? Or is the rating change delayed for some reason?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I have been starting to wonder the same thing. And it was my first time solving C too :/

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      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 )

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        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.

»
9 years ago, # |
  Vote: I like it +34 Vote: I do not like it

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    lol be happy u still have some coffee mine is finished :/

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Editorial?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    *waiting

    (irony of a meme: there is no edit option to correct spelling or grammar)

»
9 years ago, # |
  Vote: I like it +13 Vote: I do not like it

We can't "read other contestant's code" yet GlebsHP :P

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Atleast make the testcases public. Can't wait to see where i went wrong in Div2 C.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    try this :) 101010

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Getting output:-
      2
      111000

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        correct try this 5 1 0 1 0 1 and 5 0 1 0 1 0 and 5 0 1 0 1 1

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          2
          1 1 1 1 1
          2
          0 0 0 0 0
          1
          0 0 1 1 1

          • »
            »
            »
            »
            »
            »
            9 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            correct ! I have no idea then :) what is the order of ur algorithm ?

            • »
              »
              »
              »
              »
              »
              »
              9 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              It's O(n) Finally found out the mistake. Implemented it in the wrong way. Thanks for your help.

»
9 years ago, # |
Rev. 2   Vote: I like it +43 Vote: I do not like it

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?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +43 Vote: I do not like it

    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.

»
9 years ago, # |
  Vote: I like it -10 Vote: I do not like it

Zlobober back maybe ? :D

»
9 years ago, # |
  Vote: I like it +230 Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +86 Vote: I do not like it

Looks like GlebsHP is counting rating manually :)

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    or maybe code that computes rating is like this:

    sleep(10 * 60 * 60 * 1000); //10 hours
    update_ratings();
    
»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

hi first thank GlebsHP for prepare The Contest, the problems are very nice and creative:) but system rating... :(

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

For those interested, here is a much easier version of three states. http://www.usaco.org/index.php?page=viewproblem2&cpid=88

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The problem is very simple anyway :)) In my opinion, it was the easiest div1 problem from the contest

»
9 years ago, # |
  Vote: I like it -17 Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Finally we can see submissions. I hope ratings will be updated soon. :)

»
9 years ago, # |
  Vote: I like it -8 Vote: I do not like it

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 !!

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

They should change Codeforces' logo for this blog to something like

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

13849187 , what is wrong with this code? Why is the output blank? It runs fine on my compiler

»
9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Finally rating change. o_o Waiting for saturday contest. :)

»
9 years ago, # |
  Vote: I like it +16 Vote: I do not like it

waiting for solutions for the contest...

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Editorial in Russian will be published in approximately 10 minutes. Unfortunately, English one will be published only tomorrow.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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://mirror.codeforces.com/contest/591/submission/13852036

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    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.