Comments
+3

Faced same issue

https://codeforces.me/contest/2236/submission/378437348 https://codeforces.me/contest/2236/submission/378437268

differnce between then is just one uses long long and one has int

In D There is no need to prove that u can say NO if number of problematic index is >4 U can take a big number like 1000 and solution will still pass eg:

https://codeforces.me/contest/2233/submission/378004270

Enjoyed the contest Couldn’t think of binary search on D :(

On xoxo → Codeforces Round 1099 (Div. 2), 5 months ago
+1

The way I checked was if high== low high-> largest element and low -> lowest element Then answer is done If high=low+1 and high is divisible by 2 the final value will be high( high=2 and low=1 is edge case handle separately ) Any other case just implementthe algo on high

On xoxo → Codeforces Round 1099 (Div. 2), 5 months ago
0

Just tried to brute force C and it passed Is that the optimal solution?

Same

C2 has too big of a jump in difficulty

Does D have a non brute force solution?