Comments

in problem E where there is equation for b2-b1 we should substract (n-1)*a2 instead of n*a2

On UlissaoFinally Green, 2 years ago
0

Solve problems

0

Gratz

0 is a special case. When you have more than (n+1)/2 zeros then MEX != 0; If 0 isn't MEX we look at other numbers from 1 to n. If n-number_of_zeros_in_our_array>=1 it means that this number is MEX, because you can just make an array like that: {actual_number,x,x,x,0,0,0}. Zeros are ignored so we put them at the end to not damage our result. x- are all numbers excluding zeros.

Could D be solved this way but counting decreasing values instead of increasing?

+1

you could just copy pi digits from the sample input xD