danilka.pro's blog

By danilka.pro, history, 9 years ago, translation, In English

Greetings, Codeforces!

My name is Danil Sagunov, and I used to be red... Anyway, I wish to congratulate you with the Second Revolution!

I am glad to introduce that this Saturday, 3rd October at 19:30 MSK Codeforces Round #323 for both divisions will take place. Problemset has been prepared for you by me and Vitaly gridnevvvit Gridnev. This is not the first round we are authors of and I'm sure that it's not the last.

Special thanks to our friends Maxim Neon Mescheryakov, Vladimir vovuh Petrov and Roman Roms Glazov for helping us preparing the round. I would like to thank Max Zlobober Akhmedov for his coordinator activity, Michael MikeMirzayanov Mirzayanov for creating and supporting Codeforces and Polygon systems, making this round possible, and Maria Delinur Belova for translating problem statements into English.

Thanks to Vladislav winger Isenbaev and Alex AlexFetisov Fetisov for testing the round problemset!

Both division participants will be given five problems and two hours to solve them. I hope that everyone will find the problems interesting and many of you will return your colors.

UPD The round duration was written incorrectly in the e-mail announcement, the correct duration is 2 hours, not 2.5 hours.

UPD2 Round have been successfully finished! Thank you all for participating.

Congratulations to 1 division winners!

  1. ecnerwala
  2. ikatanic
  3. uwi
  4. PavelKunyavskiy
  5. sd0061

And the second division:

  1. wrong_order
  2. ahwhlzz
  3. kefaa

My gratitude to fotiIe96, one to solve problem D!

UPD3 Editorial can be found here

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

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

used to be red :(

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

    I_love_Tanya_Romanova changed his bio on Quora to "Red on Codeforces" from "Winner of SEERC, ACM ICPC finalist" :D

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

      He participates at SEERC, not NEERC

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

      You are wrong — I didn't make any changes in last several days :) These bios are topic-wise, and I had red at CF/TC for CF and TC topics for a long time (while SEERC-related stuff was used for topics like "competitive programming" and "ACM ICPC").

      I still think that winning SEERC is not as easy as getting red, even after recent changes — at least you need some good team for SEERC, while for red CF color only your skill matters. Plus you have to solve harder problems :) Maybe our region is not as strong as NEERC, but still you have to compete against other reds...

      And I really like these changes — we'll see how it will work out... But right now it added value to red color. Now I have decent chances to lose it soon, while it sounded much harder several days ago :)

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

      Warm Up ACM ICPC finalist :D

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

        He is so humble, that most people don't appreciate him. I know he mostly says that he is not a genius, that he is not like those other guys who can reinvent an algorithm on the spot in a competition, but it hurts to see people interpret his humility as otherwise. He is damn talented. He is damn hardworking. And he is a very nice person. So please don't say things that seem like you're making fun of him. He under-speaks his achievements. But you shouldn't.

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

        Not Acm Icpc finallist,warm up for regional acm icpc.

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

    In which revolution?!

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

To be honest i don't like previous gridnevvvit's round . Mostly problem statements are not clear at all , non russian speaker like me had a real tough time on those rounds . But i must admit there is tremendous change in recent some Rounds . Problems statement are clear now with explanation . Hopefully it will continue . Recent change on Codeforces make both Div 1 & 2 more interesting . Eagerly waiting to see how rating will change after this round .

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

When half of the people who prepared the round are Div 2...

Anyway, I am an optimist about the new system. The distribution will get better in time.

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

my first palindroom contest!

good feeling :D!

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

    This is every contestant's first contest in some way or the other(First contest with Updated rules).

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

    But my first **_palindrome _** contest

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

Someone dare to ask "Which one is harder, becoming red on Topcoder or Codeforces " .

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

    A lot of reds have been saying its much easier to become red on CF, than being red on topcoder. MikeMirzayanov had a fitting reply to that, and most reds lost the color. So sad.

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

Will this round follow the new rating formula developed by Mike and his team?

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

Michael MikeMirzayanov Mirzayanov :D

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

Tomorrow first day at university & contest round #323 ^^ Hope good rates :)

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

Auto comment: topic has been updated by danilka.pro (previous revision, new revision, compare).

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

Good luck to everyone!

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

First contest with new colors.. Hope this will brings us luck:)

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

Blue to Cyan....:-( But it looks really inspiring :-)

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

Back to the original color? I don't think it's a good news for tourist,Petr,vepifanov and rng_58.

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

Last Challenge was not that tough...Hoping for best for this challenge

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

Wow, only about 600 participants in div.1, the pressure is real :D

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

My new handle : I_lost_my_color

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

div 1: 600 div 2: 6000

6000 / 600 = 10 :) I love this numbers :)

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

Welcome back guys :D

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

Now there's no need for some of div1 users to make fake accounts to participate in div2 contest :D

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

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

I think this is the first time where div2 contest will be much challenging than div1. :P

Good luck everyone and may the best return to div1. :D

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

fight for being in div-1 got more interesting .

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

CRASH!? Or was that only with my computer/internet?

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

delayed ??? server is busy ??? what the **** ???

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

I should never expect Codeforces round starts on time. T^T.

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

    You should never expect anything on time.

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

      looks like Xellos is yellow.. No troll Xellos?

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

        Yes, I can change my colour at will. For example, I'll be red after this contest.

        UPD: Or not. Probably because new rating formula.

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

Sever is too slow -_- hopefully it will be okay during contest time :)

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

I hate delay :|

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

Is anyone else unable to access CodeForces at times right before a contest? I don't pretend to know the reason for this, but if the servers do not handle such large amounts of participants well, then we can start a Kickstarter or Patreon to fund for server upgrades. I'm sure many of us wouldn't mind giving a [insert monetary unit] or two for this project.

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

Am I the only one waiting for score distribution ??

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

    It will be announced shortly before the contest...

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

8000 participants, nice. Was even 7000 reached before?

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

    No, there was only 6950 on Bayan Thanks-Round (#320).

    In fact, in 15 minutes before round we felt like:

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

    too many people are eager to get back their colors!!

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

How to solve Div-2 D

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

    I think we must find all flat parts in region [1,2*n]. Then do LIS in n^2 for each point and see if LIS upto this point+(t-2)*flatpart of this point is the highest

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

    My idea(which didn't pass pretest 2) was to split the problem into 2 cases:

    If T<=250, then just run LIS algorithm and get the answer.

    Otherwise, run the LIS algo on the first n * 250 numbers and get the sequence. Then pick some number close to the end(but not quite at the end): this is your "capped" value. You then treat the other T-250 periods as if the only numbers we selected in them were occurrences of this "capped" value. Then on the last period you can select higher numbers or whatever. This is probably wrong though :P

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

      This isn't wrong, I solved it like this.

      If T<=200 just solve with LIS. Else:

      For each different value v in the initial sequence, do a LIS in the first n*100 values which only considers values <= v. Then, just repeat v for the middle n*(t-200) numbers. Finally, run LIS for the last n*100 numbers considering only those >= v.

      It's pretty fast.

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

    Let us define a graph with 300 nodes with weight of edge (i, j) denoting the length of lis starting with beginning value (not the index) being i and ending value being j.

    Now, we want to find a maximum weight walk in the graph of length T. This can be done by matrix exponentiation.

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

      will this work in 1sec ?? . Complexcity of your approach will be (300*300*300)*log10^7 .

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

        Yes, I did make it work in time. You can check my submission.

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

        Notice that you may compress coordinates, it doesn't modifies complexity but will improve your speed by a big factor 3^3 = 27, so your code will be 27 times faster. BTW, My solution was O(n^3)

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

    If T <= 5000, then find the LIS for the A x T array by nlog(n).
    Else, find the answer for s1 = A x 5000 and for s2 = A x 5001, then X = s2 — s1.
    Result is s1 + (T — 5000) * X;
    13386622

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

I saw many people hacked C div2. what is the test?

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

    i hacked using

    4

    2 2 2 2 2 2 2 2 2 2 2 2 4 4 4 4

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

    My first submission produced wrong answer for this case:

    4

    10 5 2 2 5 5 1 1 2 1 4 4 2 1 4 4

    I think they used similar one for hacking.

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

what on god sake is the 3rd pretest from div1B?

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

What was everyone's solution to Div2C/Div1A? Mine was a really questionable greedy which sorted all of the values descending, took the top 2 as the first 2 numbers, and then removed pairwise gcds, took the next descending number available, remove its pairwise gcds with all other chosen numbers, rinse and repeat.

I feel like there's some counterexample to this algorithm, but it passed pretests.

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

    I did the same.. and I think it is correct

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

    Did the same, but got TLE on 7 pretest.

    Could you tell some more on your implementation?

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

    what if the top number repeats ,like 6 6 4 2. Hope you handled that.

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

    That's what I did too, and I'm pretty sure it's correct. A not-very-well-explained proof: Consider the situation: You have a partial solution that is certain, and you need to sort the remaining numbers. If you don't put the biggest one on the diagonal in the table (i.e. as one of the numbers we're looking for), and pick some smaller one for all the cells there. Then you have to put the big number somewhere else. But the number on the diagonal in the same row/col as the biggest number has to be a multiple of that -> contradiction.

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

    It's correct. Notice that if you make the GCD table from the sorted array A, then the maximum element of (full table minus a square touching the bottom right corner) is the last diagonal element.

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

    I'ts definitely correct. I have most of an inductive proof on my scrap paper.

    I did precisely this with C++ multisets as my underlying data structure. Got TLE. I constructed the worst case on my computer and it runs in ~0.1 seconds. No clue what the problem is.

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

How to solve Div2 D/ Div1 B

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

The first time in my life that I failed all the problems. Look like I will have to go back to DIV2 soon...

Also, "Mathforces Round #323"?

Through, all the problems seem very interesting today. I wonder how to solve A and B.

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

    In first one we can make two arrays : one for horizontal and one for vertical and initialize them to zero. Then while taking input we can check if both are zero then we store the position at which input comes. After taking all input we print the stored values.

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

    Div1-A

    Sort the array. It's obvious that the biggest number in array is actually from answer (gcd(A, A) = A, gcd(A, B) <= min(A, B)). So you take the biggest number and store in some Ans array. Next biggest number in array (let's call it B) is actually the second number from answer because gcd(A, B) <= B and gcd(B, B) = B. So now you know that it's number from answer, you erase it from array and add to the answer. Now last move, you need to erase gcd(A, B) and gcd(B, A) from the array. Finally, at every step you take the biggest number, add it to the answer, erase it from the array and erase each gcd with other numbers in answer two times. That's all.

    My solution 13368755

    Div1-B

    It's kinda obvious that there will be some "plato" in answer subsequence. There will be one number (maybe on several positions) that will be taken in all copies of initial array in the "middle" of answer. So I checked if n * T is bigger than 10000 and if it is than I take Tnew copies of array such that n * Tnew <  = 10000. Now you can compute the length of the longest subsequence with the dummy quadratic algorithm and than you take two neighbor copies of array in the middle of answer. You take the biggest length of subsequence to them and say that difference between these lengths will be constant between each neighbor pair of arrays in the middle of the answer. So now you just add that difference multiplied to T - Tnew to the computed answer on Tnew copies.

    If n * T is less than 10000 you can use dummy algorithm to compute answer.

    My solution 13373614

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

Question.C (Div-II) was very ambiguous question.....Is ans not just diagonal as GCD(x, x) = x OR am I missing something ?...Can somebody please explain ?

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

    The input can be in any order.

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

    I thought this, but then I read that ELEMENTS CAN BE INPUTTED IN ANY ORDER.

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

    You're right, answer is diagonal elements but the thing is elements in the input were in an arbitrary order

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

    Graph is not given as it.. It is given in arbitrary order

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

    and gcd(x,y)<=min(x,y)

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

What is pretest 3 on Div2D? My code passes (4 10 1 1 1 2 => 31)

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

I always thought that all the stl functions are pass by reference rather than pass by value. Wasted a lot of time in figuring out what was making my code slow.

slow code

 int fun(multiset st) {  multiset :: iterator it = st.end();  it--;  return it; } 

fast code

 int fun(multiset &st) {  multiset :: iterator it = st.end();  it--;  return it; } 

Only difference is in passing the arguments, in one I pass by value and in other by reference.

Can anybody please tell me whether this is the only stl container which has pass by value behavior or are there some more?

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

    You are still thinking in Java, everything in C++ is pass by value unless you explicitly pass a pointer/reference.

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

    Your st is the instance of multiset<...> template class, so when you pass it without a reference (&), you pass the whole structure. It applies to all STL containers, not only multiset so don't forget to pass the reference!

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

    Because when you declare parameter without a refrence you are saying "Please copy the whole stuff", which can be VERY slow.

    When you are passing by reference you just passing an pointer to the object, so nothing should be copied.

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

Is intended complexity for problem div1-D O(logp(A)^2*2*2) ?

If so, how is it possible to make it accepted in java?

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

    Yes, we have a solution in Java that works in 2.2 sec.

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

      So, is memory also O(logP(A)^2*2*2)?

      Oh, I see, you don't need to keep all rows in dp. Next time I will write using for's instead of memorisation. Thanks you very much. So sad :(.

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

Editorials??

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

When will the editorials be released ?

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

Assuming I didn't mess anything up, I think div1 D shouldn't be hard to solve with a simple DP, it's just annoying to implement. You need the following fact: the greatest power of p dividing is the number of carries when adding a + b in base p. So if A has n digits when written as an - 1... a1a0 in base p, we can recursively compute dp[i][j][k], the number of ways up to sum two a, b < pi, with j carries, with k = 0 if a + b < pi, and k = 1 otherwise (so 0 ≤ i < n, 0 ≤ j ≤ n, and 0 ≤ k ≤ 1). I believe the edge cases with a ≥ pn - 1 or b ≥ pn - 1 can be done with similar, more careful analysis.

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

Why you do this CF ?

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

    If you see something like this, write us a message and we'll ignore one of those two submissions. We have a system that detects double-submissions with zero diff, but sometimes it doesn't work properly :(

    I ignored the second of those two submissions.

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

      Thnx :)

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

      Hi, the div 1 status changed from Finished --> System testing, with 1 only pending submission 13368130 from ashish1610. And now we can't use practice mode. Did you make any mistake? :)

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

        Yes, you are right. I guess you should be able to upsolve now, sorry for that :)

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

      Now, I have -1 with pretests passed.

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

        Don't worry, we'll fix that. Looks like I accidentally broke something.

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

        Fixed! I had to run a micro-system-testing in order to fix your submit :)

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

          Thanks :)

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

          Is there any chance this could stall the rating changes as well, since the changes already took effect for Div 2 (a much larger contest)?

          Also now that we're on the topic, why do the rating changes generally take some time to take effect? They don't seem that hard to calculate, do you guys manually check some flagged submissions for cheating or something?

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

            The rating has been recalculated for both divisions, isn't it?

            There is a lot of manual work every time after the contest (including looking through some suspicious submissions, catching cheaters etc). This delays rating change as well as system testing sometimes.

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

              Oh, 5 minutes ago they weren't, or maybe my cache was messing with me.

              I must say, the overall changes in rating were pretty underwhelming (Largest rating changes in a previous Div 1 vs largest rating changes in this Div 1). Is that because this contest had only half the participants? Or was one of the ideas behind the new formula (there's a new formula right?) that ranks would be more stable?

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

              When will be available the new ranking formula?? Was it used to rate this contest (#323)??

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

div2 D, in O(n^3*log T) right?

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

    I solve in O(300 * n2)

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

    I solved it in O(min(108, (nt)2)) 13373614

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

    I solved it in O(n^2*logn)

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

    I had the same complexity. I observed that for a LIS,I need maximum n periodic arrays where an element changes(from x to y ,y>x) ,the others contain only an element. But I fixed the number of periodic arrays needed,So I have (n +n^2+..+n*n)*log.

    I didn't see that the case with n*n(or t if n>t) includes all of the others,so if there is an answer when I need just x<n arrays,it will include also that :P

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

I feel like 2 hours is too little for this Div 1 problemset. 2.5 hours would be better.

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

How I feel about number of div2 participants:

(╯°□°)╯︵ ʇsǝʇsʎs

I'm joking, of course, thanks for the round and work which went into the new rating system!

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

Why is the system testing taking this long? Oh, because too many people in div2.

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

Nice contest

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

can someone tell me why my div1 c submission got tle13381594

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

    It looks almost the same as mine... Maybe the timelimit is too tight. (Or the problem setter has a better solution.)

    Edit: dreamoon_love_AA is right. I used n/len gcd instead.

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

    I think you use too many time of function __gcd() in line 34. So the time complexity of your program is O(nlog2n).

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

What's the point that the system doesn't show test-cases during the system test?

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

Damn ! Man div 1 C had a tight timelimit !
my solution was of O(d(n) * n) damn ;D

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

Okhhh!! Finally got «C» after years :~

Probably missing the witching Cyan! :|

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

Thank you for this round — it felt great solving the problems. Especially problem D, with having to go on a hunch of doing LIS from two sides for some number of copies of the array, even though I wasn't able to prove on-the-fly that this will work.

Hopefully I'll be back to div1 now. :)

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

Ranks are about to be updated!

My rating is most probably going to decrease. But still

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

Wonder why the problemset page still 'temporarily blocked' ?

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

Eagerly waiting for Editorial...Its 1:16am in India :)

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

eagerly waiting for the rating change!

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

Where is editorial???

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

I lol'ed after seeing vitux Solution

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

Could someone explain please why this solution is ac? http://codeforces.net/contest/583/submission/13385298

Vectors have not enough length. Weak tests? I noticed this at the end of contest and lost 250 score to fix this. It was senselessly ;(

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

    He has written:

     vertical = vector<bool> (n, false);
     horizontal = vector<bool> (n, false);
    
  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    If you are talking about +-1 error in your solution than it is actually rare to crash because of this. It's like chances that A[n] will cause an Runtime error are very small (but they exist) and it's often better to leave the solution as it is.

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

      I think it is better to lost some score than to lost everything) And i thought that vertical[n] == horizontal[0] ;( And in test where first numbers are n it can cause error.

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

        You can't say anything because vector is not an array, so you don't really know how much space is allocated, is there something after your data in vector class by design etc (only if you haven't profound knowledge in C++). And about correcting mistake, I'm saying that it's unnecessary because I haven't ever seen program failing because of that error while using vectors.

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

    Vector [] operator doesn't check if the index is out of bounds. Using it with index outside the bounds is undefined behavior. Vectors may also allocate more memory than necessary so that new elements may be added without reallocation.

    You aren't going very far our of the bounds anyway.

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

Suddenly everything in codeforces turned into russian language for me :D

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

    what is the feel seeing russian as foreign language?

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

It seems like there is an "anti-cheating" pass, or something similar, after systest?

I noticed my rank increase from 83 to 81 already :D

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

    Yeah may be. Some submissions got skipped!

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

.

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

Why it work? 13382543

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

the new formula seems to be so painful(

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

my contest rating is 1608 and still i'm Specialist

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

Why codeforces use 32-bit system?

Main problem is multiplication: http://goo.gl/VVVWsN

  • It's really annoying always use int32_t and upcast-downcast it in 2015.
  • call __moddi3 . It's really slow.
»
9 years ago, # |
  Vote: I like it +58 Vote: I do not like it

Formula feels a bit weird (don't know if it's new one or not). I though I did ok, Top 60 out of 4.7k (top 1.3%), but I'll need to do this at least another 2 times like this to get div 1 :(.

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

    Also only -91 (so cyan) for last place (with -600 points) seems weird. My natural instinct would've said gray, maybe low green.

    Edit: I guess that happened before too, looking at http://codeforces.net/profile/worse my bad :P (though worse was 2k, and this was 4.7, so maybe it's not actually the same)

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

      I think the new formula makes it harder that only one contest affects your rating like what was happening before in goodbye contests for example.

      I'm the 5th today and hardly made it out of div2.

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

      Admins, please rejudge with old formula.

      We haven't said goodbye to it, it's not polite. ;(

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

My rating before this contest was very low(1954), I took 53 place, and earned only +118.

It seems like it would be hard to escape from violet(

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

    It seems like formula changed.

    Upd.: Didn't read comments before, sorry.

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

Oh wow, congrats to div 2 winner wrong_order I just realized he solved all of the problems in reverse and still managed to win, talk about relevant username.

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

Ouch, just debugged my 2C to find the problem on Test 23. A one-word typo for a corner case can ruin the whole solution! >:[.

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

    I got WA on 23 as well. I guess its missing an integer in the end(int32 expected). What's your typo?

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

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

http://codeforces.net/contest/583/standings/participant/5798484#p5798484 This guy decided to copy all solutions and submit them during virtual participation... what a bummer.