Comments
On scanhexCodeforces Round #534, 5 years ago
+4

I'm not asking about solution, I'm asking about pretest.

On scanhexCodeforces Round #534, 5 years ago
+3

Can someone explain what the hell is going on with pretest 1 to div1B, div2D?

while(kx!=500&&ky!=500)

Should be || instead &&.

Can anyone explain solution to E with ordered statistics set? I saw few codes that get AC but I don't understand them all. And what does this magic loop:

for(int i = x; i <= n; i += i & -i)

Graph doesn't have to be connected. Here is example: n = 3 * 10^5, m = 0 Then this part:

Spoiler

will take n^2 time. Another bug in your code is in this line:

ans += (1 << red) % MOD + (1 << black) % MOD;

black and red can be bigger than 64. Better option is to just count every 2^k % MOD at the start of your program:

POT[0] = 1;
for (int i = 1; i < N; i++)
    POT[i] = (POT[i - 1] * 2) % mod;

In problem E you have to divide both permutations to blocks of length sqrt(n) and than make some calculations.

Graph doesn't have to be connected.

On cookiedothCodeforces Round #526, 5 years ago
0

Can someone give me some links where I can learn about convex hull opt? The old ones that are on codeforces blog's does not work.

I don't really understand why problems like C appears in contest like this. I could understand it, if contest would have 5h.

But excluding this task contest was really good prepared and there wasn't dos attack during the contest ;)

+4

And computers become faster and faster nowadays. It's not like 10^6 operations will take 1 second...

+43

Yes, that was nice. This contest was really well written. All tasks have pretty good and short solutions. Thanks to Ashishgup for that contest.

I have the same idea, but haven't enough time to debug.

This solution should be good. You have at lest 1/4 chance to find this leafs if you take two random vertices.

+4

OK, it's small probability. But if he has more than 50 accounts? Mabye there is a person who starts in contests to have a high rating...

+6

Maybe someone is cheating and has two accounts: at one he sends wrong solutions, and from another he hacks...

+18

Thanks Kniaz for writing problems. I like tasks A, B, E, F very much, D is OK, but problem C is terrible. I hate this type. A lot of commands 'if', 'else'. But it's only my liking. So excluding problem C contest was pretty good.