Comments
On AquaMoon → Codeforces Round #732, 5 years ago
+43

As a tester, I hope you can get the ideal score :)

+5

Can you unhide the main tests? I can't wait to find why I FSTed:(

I didn't notice at first too, and an hour was wasted:(

lol same

+18

Lots of contestants passed E with a random algorithm like 108293277. There is a hack test:

50000 5
1 1 1 2 2
1 1 2 2 1
1 2 1 1 2
1 2 1 2 1
1 2 2 1 1
2 1 1 1 2
2 1 1 2 1
2 1 2 1 1
2 2 1 1 1
rand() rand() 1 1 1
rand() rand() 1 1 1
...

The answer is 1 1 1 1 1 but if you randomly choose the answer from every sequence, the accuracy is $$$O(\frac{1}{n^2})$$$.

+24

I misread non-increasing as non-decreasing in problem B and worked almost 2 hours on it(

Let $$$a_i$$$ equal to the number of $$$i$$$ in the set, and $$$x$$$ the average of numbers, then we have:

$$$ \begin{aligned} &\frac{\sum\limits_{i=1}^nia_i}{\sum\limits_{i=1}^na_i}=x\\ \Leftrightarrow&\sum\limits_{i=1}^n(i-x)a_i=0\\ \Leftrightarrow&\sum\limits_{i=1}^{n-x}ia_{x+i}=\sum\limits_{i=1}^{x-1}ia_{x-i} \end{aligned} $$$

Found that the restrictions on all $$$a_i$$$ are the same, so we need to choose two sequences length $$$n-x$$$ and $$$x-1$$$, and the sums are equal, like the editorial.