Comments

You just have to find optimal 'x' for all the pairs of adjacent elements of the sorted array of 'a', whichever pair gives max (ai^x & aj^x) is the ans.

0

It's all fun and games unless you are <1400

Ohh got it, thanks.

yes

so what was the edge case for C?

Did the same but getting wrong on test 3.

At first, 6->0 and 8->1. So the monster with health 6 will be dead and there is only 1 monster left with health 1 and power 8. Now this monster will reduce k=7 to 0. Hence genos cannot kill the last monster and the answer is NO.

It'll be back after removing cheaters.

Didn't we need sieve in G?

Entire contest I was searching for some efficient solution of C, at last tried brute force and it worked. Do the brute force really for C or am I gonna get FST?

Approx 50 people solved F. Making this round unrated is just unfair for almost everyone who participated in this contest. This actually seems to be a punishment for participants rather than author. Can't we just remove the problem F, this way it will have much lesser impact.

Took me a long time to debug, though got the approach early.

Sort the array and for each i maintain a window such that all the elements in that window should be less than (a[i]+n), so number of elements outside that window is the answer for that i. Now minimize ans for all i's.