By vovuh, history, 7 years ago, translation, In English

Hello Codeforces!

On April 04, 17:05 MSK Educational Codeforces Round 41 will start.

Series of Educational Rounds continue being held as Harbour.Space University initiative! You can read the details about the cooperation between Harbour.Space University and Codeforces in the blog post.

This round will be rated for Div. 2. It will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 7 problems and 2 hours to solve them.

The problems were prepared by Roman Roms Glazov, Adilbek adedalic Dalabaev and me.

We'd like to thank Mikhail awoo Piklayev and Ivan BledDest Androsov for the help in preparing the round.

Good luck to all participants!

UPD Editorial

UPD2

Congratulations to the winners:

Rank Competitor Problems Solved Penalty
1 dotorya 7 176
2 Um_nik 7 190
3 jtnydv25 7 532
4 Benq 6 126
5 fanache99 6 135

Congratulations to the best hackers:

Rank Competitor Hack Count
1 halyavin 178:-40
2 algmyr 113:-1
3 applese 24
4 pajenegod 24:-11
5 _HossamYehia_ 14:-1

518 successful hacks and 491 unsuccessful hacks were made in total!

And finally people who were the first to solve each problem:

Problem Competitor Penalty
A bazsi700 0:01
B MrDindows 0:03
C dotorya 0:07
D emoairx 0:06
E aneesh2312 0:16
F dotorya 0:43
G jtnydv25 0:12

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

| Write comment?
»
7 years ago, # |
  Vote: I like it -58 Vote: I do not like it

First!

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

Also thank you MikeMirzayanov for platforms Codeforces and Polygon?

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

Wait A & B & C solutions in arabic videos after the Educational

C solution of yesterday contest https://www.youtube.com/watch?v=bvDYHy9ESnY

A solution of yesterday contest https://www.youtube.com/watch?v=CClZZPYJmaI&index=3

Wait us , Thank you.

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

I hope that all the problems are mathematical.

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

I think rated educational rounds are not a very good idea it's unfair that a person solved C&D will be just like who solved A&B :( hacking is unfair in this case .. it should be a full testing system rounds.

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

    You won't have such problems if you'll solve 7 problem. :thinking:

    --- 'The greatest enemy of knowledge is not ignorance, it is illusion of knowledge'

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

    That's like saying ACM ICPC is unfair because of it's certain rules (which are used in many contest).

    There person who solved C & D instead of A & B (assuming a and b are easier) should just use a different strategy than normal contests.

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

      In ICPC, problems are not sorted according to difficulty. The third and fourth problem aren't necessarily harder than the first two problems.

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

    I believe that the person who can solve C&D can also solve A&B very fast. So, there is nothing to worry.

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

    it's time to change your thinking, and also no one cares what you think.

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

My favorite sentense -- Watch Tufurama season 3 episode 7 online full hd free

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

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

IT HAS very little Time for me... else i solved all problem ... it make me depressed :(

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

    You can solve them after the contest, but it would be unrated

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

      i can do not participate ... out of contest solving with relaxation ;). its better

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

Hope high hacks.

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

Any hints on problem D test case 10?

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

    Are you using float or double in your solution?

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

      Yes, is that a problem?

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

        I was failing test 9 with doubles, but I changed my approach to stay away from floating points and got Accepted so that could be one reason.

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

        Dude I was like how can you answer this question with "Yes". I was thinking like "Are you a male or female?" lol

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

How to solve problem D

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

    Look at first 3 points. If they are collinear then find those points that don't belong to that line and check if they are collinear. If yes, answer is yes, otherwise no.

    If 3 points are not collinear, then you need to pick 2 points (out of these 3) that will maybe belong to the same line. There are 3 combinations, and for each one check if it possible to partition that way(same way as above)

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

      Thanks for replying. But how to check if N points are collinear

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

    If n<=4, the answer is YES.

    Else, let's check about first 5 points.

    If there are no 3 points set on the same line, the answer is NO.

    The points set are exist,you have to use the line because you can use only 2 lines.

    Then, you remove some points that on the line and check the left points are on the same line or not.

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

      If I permute the first 4 points, and check collinearity for all the others with at least one of the two pairs( lines) I can make out of the four, I recieve W.A veredict, can any one tell my why is that so?

      my source code = http://codeforces.me/contest/961/submission/36973072

      pseudocode =

      while(permute(1,2,3,4)) for(int i = 5 ;i <= n;i++){ if ( !(check (1 , 2, p[i] ) || check ( 3, 4, p[i]) )){ found =1 ; } if ( found ) puts("YES"); } puts("NO");

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

        Because the first 4 points may be in the same line while the rest may be in another one.

        Take for instance

        8
        0 0
        1 0
        2 0
        3 0
        0 1
        1 1
        2 1
        3 1
        

        The answer should be yes, but I think you are printing no.

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

        Maybe you have to check all 2 points set of 4 points.

        for(i=0;i<4;i++){ for(j=i+1;j<4;j++){

        //Check using line v[i],v[j]

        } }

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

          It seems right, but again you'll need to check the collinearity of the 4 points, if they are collinear, you just have to check if the remaining points are also collinear.

          However if these 4 points aren't collinear then ,as you said we'll check all 2 point sets, which is 6 combinations. Then the remaining points have to lie on the lines in any of the combinations.

          Correct me if I'm wrong

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

            That's also right.

            If the 4 points are on the same line,the line is included in the test.

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

    If n < 4, then YES

    You will try to fix a line and see if all the remaining points lie on the same line.

    There are just 3 possible lines that can be formed with 3 different points:

    .Line formed by point 0 and point 1
    .Line formed by point 0 and point 2
    .Line formed by point 1 and point 2

    To discover the other line, just take the first 2 points that does not lie in the fixed line.

    For each line, go through all the remaining points, they must be inside the fixed line or in the other line.

    If any of the fixed lines succeeded, then YES

    Else, NO

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

Hi, for the last problem, I notice the answer is :

.

I use fft to calculate S(i, j). However, I get TLE.

Is there a faster way ?

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

    You can get a row from fft right not column,Can we??

    I was trying some combinatorial argument but I am going wrong somewhere. Can some one help me.First thing is ingore a[i]'s. later we can multiply with sum of a[i].
    Using the formula mentioned in above comment and also that we can run i from 0 instead of 1.

    My argument is that we are choosing (k-1) nonempty teams from n people(need not be all people) and selecting a captain among remaining people.

    So inverse idea is selecting a captain first in n ways and then selecting (k-1) teams from n-1 people(need not be all people ). Now this part is S(n,k). So answer is n*S(n,k)

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

    Okay, so what I do is this:

    To calculate in how many subsets of size j an element can be we use the formula: SS=choose(n-1,j-1)*X where X is the number of partitions of size k-1 of the rest of the elements. Well, let's think of a partition as kind of placing a divider between the elements, we have n-j elements, every divider creates 1 new set and we need k-1 sets so we put k-2 dividers, thus X = choose(n-j-1,k-2).

    This approach gets WA on test 7 Could anyone tell me what is wrong with this solution?

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

      Thinking of partitions as kind of placing a dividers between elements is incorrect because in fixed partition subsets doesn't form continous subsegments in general case.

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

        Ohh yes, that went over my head. Thank you for explaining!

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

Are Hashing and Binary Search the correct approach for problem F or there exist a deterministic solution?

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

    I don't see the way with binary search.

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

      You can precompute the prefix hash values for the given string and its reverse. And then all we have to do is iterate for all the i-string and apply binary search on the answer for the ith value because using hashing we will be able to check the 2 parts are equal or not in O(1).

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

        I think it's wrong. If x is pre-suf it's not mean that x[0,x.size()-2] is too.

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

          Oh yes, I apologize!! I got the mistake. So, do you know the correct approach for the problem ??

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

    For F, if answer for k - substring is fk, then note that fk - 1 <  = fk + 2. So, for finding fk - 1 start from length fk + 2, coming down and find the largest length r such that length r prefix is the same as length r suffix. Complexity can be proved to be O(n), using a KMP like analysis.

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

      If you don't mind, can you please elaborate a little more. Thanks!

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

What is the idea behind G?
I got that the answer is

Where is the Stirling number of the second kind. How do you evaluate this?

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

    , where aij is an indication variable for both

    Number of ways to partition such that i and j are in the same partition is (consider a new set where (i, j) is merged).

    It follows that the answer is

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

      My solution: Look at one wi. If it is alone in the set there are S(n-1,k-1) ways of arranging the rest and the weight of wi is 1. Or wi isn't alone. Then first partition the rest there are S(n-1,k) ways of doing that. Then we place wi into one of those set and sum the sizes of these new sets. Together (sum wi)(S(n-1,k-1) + (n-1+k)S(n-1,k)).

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

Was there a more elegant and faster way of solving E, than with persistent segment trees?

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

    I used a merge-sort tree,
    For each season i calculate the number of seasons j in the range(1,min(A[i],n)) with episodes >= i
    Sum all the queries for the final answer

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

    Just process queries offline, use bit.

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

    STL Policy based data structures

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

      I am using a multiset and it is giving TLE in test case 7.

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

        That's because complexity of distance is linear for multiset.

        I don't think it's possible to find number of integers >= r in multiset in logn complexity.

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

    I just use a normal segment tree. For each season I store 1 if it contains more series than current threshold or 0 otherwise. I consequently update threshold from 0 to n-1 and so need n updates of the tree total. For each threshold i I ask the sum of the first min(ai, n) elements.

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

    I solved it with "wavelet tree". hope it passes the system test

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

Hi! I participated for the first time and my two solutions were accepted for Tetris and Lecture Sleep. Where can I find myself with some points earned for this modest but first attempt? I was registered both by FB and my own name. Thanks, Levi

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

    You'll see ranking change after the 24 hours of hacking allowed.

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

      Is hacking in this case attempts to find errors in jury solutions?

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

        No, you can check other peoples solution and try to make them give a wrong answer. This everyone can hack anyone for 24 hours thing is only for Educational Rounds.

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

          OK. And here I have some 825 points for another contest. Does this result appear somewhere? Influences rating or something?

          I am just very new here. Thanks

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

            No, you have to participate to the contest to have changes in your rating, which has a specific 2-hours period. You can solve the problems later like you did, they wont affect your rating.

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


I think that problem D is very similar to BAPC 2016 Preliminaries problem J..

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

Can someone discribe test 10 of problem D?

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

    maybe floating number problem

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

    I guess that only two points occupy one of two lines. So if we choose to solve the problem by a random algorithm, it will be hard draw the second randomly in the right way. We should pick up two points those weren't be visited before to draw another straight line. And don't pick them up in a random way, either, or you will get TLE.

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

      I knew that problem can be solved by Dirichlet's theorem — solution very nice.While I using if-else

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

in problem C, a valid chessboard is one which starts with 1st square of white colour right ? or it can start with either and just needs to be alternating.

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

    Oh, f*ck. PS. But why no hacks on C. I checked and both solutions pass the tests.

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

      Funny thing is my random test generator cannot find hack case for odd n. I think for odd n, it doesn't matter.

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

    Can be either.

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

    It doesn't matter because answers are the same. If [a b; c d] is optimal square placement for black lower left corner then [b a; d c] will be optimal square placement for white lower left corner.

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

      Lucky me then....I just searched google for chessboard images and found white first everytime so...

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

Rated educational rounds are unfair.In this contest I solved B & C but couldn't solve A (couldn't figure out the problem statement correctly) on the other hand my friend solve A & B and he got higher rank than me. -_-

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

    If you were both participating in ICPC. He would beat you, so...

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

Attention! !

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

What were your approaches for E? I just came up with a solution that followed the lines of: "for every i in N, check in the range [i + 1, a[i]] how many numbers are greater than i", but couldn't find a way to query this fast enough to pass the time limit. Is the idea correct, or what did you try?

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

    I just solved it with segment tree of vectors.for every 'i' I checked how many numbers in the range 1 to min(a[i],n) are greater than or equal to i. 36978334

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

    I used a pretty straight forward segment tree , no heavy data strucutre is really required , just processed the array in reverse order from n to 1 . My code if you need help -->36983745 , code i think is self explanatory but ask if needed.

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

Weren't there too many smurfs this round, rank 6 to rank 11 all first timers!!

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

    I have a feeling these are fake accounts of Div1 coders. Isn't it illegal to do this? Correct me if I'm wrong. It is really sad that our ranks degrade due to this practice. What can be done?

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

      Probably yes, and yes CF is not happy with multiple accounts.

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

Please add testcases also in editorial

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

Can somebody explain the concept of open hacking phase in an Educational Round? In Educational Round, during coding phase we get 'Accepted' and not 'Pretests passed'. What is the meaning of 'Accepted' — does it just mean pretests passed?

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

    It means that you are asked to do the impossible — hack solution that passed all tests. It is less impossible considering very small number of tests (authors need to reduce server load) in the first problems though.

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

      Thanks for the explanation. So you are the expert in doing the impossible.

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

    Because there are no pretests in educational rounds. Those during the contest are the main tests, therefore you get Accepted instead of Pretests passed. However, the data sets are a bit weaker than usual rounds, so instead you're given 24 hours to hack any solutions.

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

i want hack an answer,because i found the code may be out of bound,but in some test cases,the code can pass ,what should i do?

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

    Try copying the code and running it manually with your inputs..

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

Can someone analyse problem E for me ?

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

Wtf bro? halyavin Screenshot_20180405_135829

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

    Wtf bro? Charge your phone!

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

Task D. I use line equations ax+by+c=0 to handle vertical lines like others.

	LinePars(pair<int, int> & f, pair<int, int> & s) // Compute line parameters.
	{
		double dx = s.first - f.first;
		if (dx == 0.0)
			Set(1, 0, f);
		else
			Set(-(s.second - f.second) / dx, 1, f);
	}
	void Set(double xc, double yc, pair<int, int> & point)
	{
		Xc = xc;
		Yc = yc;
		Fc = -point.second * Yc - point.first * Xc;
	}
	bool Contains(pair<int, int> & point) const // Check whether the point fits the line.
	{
		return abs(point.first * Xc + point.second * Yc + Fc) < eps;
	}

Method Contains check whether the point fits the line. In my VS2017 it's ok, but in test system it produces nonzero results.

eps 1e-7 (36991163) wrong at 38 with YES where should be NO: abs(3.725290e-009).

eps 1e-8 (36991294) wrong at 51 with YES where should be NO: abs(-6.984919e-009).

eps 1e-9 (36991945) wrong at 52 with NO where should be YES: abs(-1.036096e-008).

Where is my mistake?

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

    Not using (64-bit) integer numbers for line calculations.

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

      I use double Xc, Yc and Fc. Differences between coordinates (like x2-x1) can be 2e9 which fits 32-bit integer. Where should I use 64-bit integer?

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

        Xc/Yc/Fc should be integers. Then you will need 64-bit integers in Contains.

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

Can someone help me for D? This is my solution — http://codeforces.me/contest/961/submission/36994056 I get the first line which has 3 points on it and i get the second line by finding the first two points which do not lie on the first line. But i have no idea why i am not passing 24th, maybe i have missed something.

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

    Why so?

    if(cnt==1) {cout<<"NO\n"; return 0;}
    ...
    if(br==1) {cout<<"NO\n"; return 0;}
    
    • »
      »
      »
      7 years ago, # ^ |
      Rev. 2   Vote: I like it +4 Vote: I do not like it

      Thank you! You are absolutely right. I can just make a random line through the point which is left. It is accepted now after i fixed this and another stupid mistake, but if it hadnt been for your comment, i wouldnt have found the second one.

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

WHEN WILL THE EDITORIALS BE AVAILABLE FOR THE QUESTIONS ?

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

lol~ I'm gonna be BULE thanks to halyavin

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

cheaters Al-Merreikh && _Mugiwara_ in problem E :O :O :O :O

disqualify !! vovuh MikeMirzayanov

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

Can someone explain, why in problem E this code got WA26, while this got accepted? Only difference is that in second code I set a[i] to n when a[i] > n, but it shouldn't change anything except doing a bit more operations add(x, -1) at the end of last for iteration.

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

    May be because if a[i]>=N, you need to push i at ind[N]?

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

      No, N is always greater than n so it doesn't change anything. But I found a mistake, I had add(x, -1) only when a[i] < N what doesn't make sense (it's because at the beginning I had for (x: ind[a[i]]) so I wanted a[i] be less than N), after removing this line it works :)

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

When rating update will happen for div 2 :(

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

    Guess this is continuation of April Fools Contest XD

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

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

Why was this round made unrated?

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

    Dunno, I'm a dog. Woof

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

    Where does it say the round is unrated? It clearly says it's rated (for Div 2) in the round description...

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

      But it looks like there is no rating update for this round.

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

        I'm sure there will be an update, don't worry, but it's probably just delayed as of now.

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

Could you please tell me how long I can get my rank ? This is my second competition!I am so excited!

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

A classic..

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

Is it rated?

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

    Rated for div.2. Maybe some technical issues occur, rating updates are delayed.

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

All of us rn.

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

Finally, Ratings are out !!!

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

Codeforces, thanks for the rating)

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

After rating updates, many new accounts are removed from the final standing page. (So my rank has been increased a lot.)

Does codeforces use some special techniques to detect multiple-accounts?

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

Haha, 961B - Lecture Sleep has one of the funniest problem statements I've seen!