Comments
0

solve() have difficult O(n ^ 2)

0

There are 500 tests and 500 n in problem A. It is 250000 elements. In problem B, for example, special limit on the amount of n: 50000. Scanner is slowly.

0

scanner?