By RAD, 13 years ago, translation, Hi everybody

Today the author of the majority of problems is Dmitry Zhukov, many thanks to him for this.
Also I want to thank Mike Mirzayanov for choosing problems for the contest and organizing it and Julia Satushina for the translation of the statements.

Good luck!

UPD: Announcement of Codeforces Beta Round 23  Comments (25)
| Write comment?
 registrations closed!! nice! bye... next time!
 Can somebody explain why the answer to B is max(0, n-2)? Or suggest a reference I can read about it...
•  Find out with tests and you'll see the solution of task B.
•  You can do some simple Math proof. Prove that it's impossible to have n or n - 1 people left. With n - 2, we can single out 2 people (these 2 guys dont know each other) and put the rest into a group where each member knows each other and knows the 2 isolated guys. It's each that this arrangement satisfies the conditions of the problem.
•  My typo: " It's easy to prove that this arrangement satisfies the conditions of the problem."
 @:Shuaib: The is a algorithm as following-First , construct a full graph .-Then  remove a random Edge from the current graph . Two vertices of this edge have a degree of n-2, and the remaining edges have a  (n-1)-degree.  So we have the answer.
•  From what I've seen in the solutions, it's enough to consider all subgroups of n contiguous boxes, wrapping around. However, I have no idea why it's correct, maybe it's related with the fact that there is always an answer.
•  If there is a pair i, j such that a[i] >= a[j] and o[i] >= o[j], we should choose the i-th box and not to choose the j-th box, and then we can solve the problem for (N - 1). Otherwise sort the boxes and get a < a < ... < a[2*N-1] and o > o > ... > o[2*N-1]. Choose boxes 1, 3, 5, ..., 2*N - 1.
•  how to prove this method can satisfy the condition in the problem? it's really hard for me to think such a solution....
•  When we pick numbers with odd indexes in a sorted sequence, their sum is always more than half the sum of all numbers in the sequence.Reasoning =>Lets remove A, We know thatA > A, A > A, ......, A[2*N - 1] > A[2*N - 2]We're adding the greater sides from all these inequalities soA + A + ... + A[2*N - 1] > A + A + ...... + A[2*N - 2]Adding A on the bigger side doesn't hurt :-) SoA + A + ........... + A[2*N - 1] > A + A + ......... + A[2*N - 1].Similarly we can prove the same for the sequence O as well (looking at it in reverse order).
•  nice explanation.
 sigh , I was trapped in Problem B for a long timeIt seems so hard for me!!!
 Why this code always gets "Presentation error test 1" ?Code hereI rewrote my solution from C# program, which passed all tests.
•  Потому что Input.txt и Output.txt?
 In my opinion tasks weren't chosen reasonably. Only 30 people solved more than two. I think that contestants should be classified by number of problems solved rather than the time. First two tasks were ok, but it would  be better if third task was solved by 60-80 people, fourth by 15-30 and  fifth was extremely difficult. In this contest all three tasks were almost at the same level of difficulty.
•  Well , I think problems must be difficult like this. The another div 2 - contests  have  easier problems .
•  Time is limited!
 Brilliant problems. I love problem C. But couldn't anything have been done so that the solutions that choose randomly n boxes and check if they are good and repeat this until they get a solution aren't accepted?
•  Consider this data:1 01 0... (amount : n - 1)0 10 1... (amount : n)It can be calculated that the probably of get a possible answer is O(1 / sqrt(N))So the random algorithm 's expect time complexity is O(N sqrt(N))But we have the O(N logN) algorithm.We can make large data  , the random solution will get TLE.
 Problem D seems so hard for me. I just can't solve this one.can you give me some tips?