Some problem with your code:
I compare the output of your source code with my accepeted (only 0.000 seconds, rank list 1) code.
There i got so much diferants:
Differenst of first 1 to 100
Comparing files MyCode.out and YourCode.OUT
***** MyCode.out
Case 17: 18
Case 18: 11
Case 19: 20
***** YourCode.OUT
Case 17: 18
Case 18: 12
Case 19: 20
*****
***** MyCode.out
Case 35: 12
Case 36: 13
Case 37: 38
***** YourCode.OUT
Case 35: 12
Case 36: 14
Case 37: 38
*****
***** MyCode.out
Case 49: 50
Case 50: 27
Case 51: 20
***** YourCode.OUT
Case 49: 50
Case 50: 28
Case 51: 20
*****
***** MyCode.out
Case 53: 54
Case 54: 29
Case 55: 16
***** YourCode.OUT
Case 53: 54
Case 54: 30
Case 55: 16
*****
***** MyCode.out
Case 71: 72
Case 72: 17
Case 73: 74
***** YourCode.OUT
Case 71: 72
Case 72: 18
Case 73: 74
*****
***** MyCode.out
Case 74: 39
Case 75: 28
Case 76: 23
***** YourCode.OUT
Case 74: 39
Case 75: 29
Case 76: 23
*****
***** MyCode.out
Case 97: 98
Case 98: 51
Case 99: 20
Case 100: 29
Case 101: 102
***** YourCode.OUT
Case 97: 98
Case 98: 52
Case 99: 20
Case 100: 30
Case 101: 102
*****
I think there must be a list of thinsgs authors must say clearly. Like this:
1. Spaces in strings - yes/no
2. Empty strings - yes/no
3. Leading zero allowed - yes/no
4. Zero is "0" (not empty string) - yes/no
5. Set is a sequence - yes/no
6. Subset/superset can be equal - yes/no
7. Any==some - yes/no
8. Multitest should be considered in asymptotic measure - yes/no
9. Expected precision - 1e-8/1e-13
10. Possibility of int64 vs. long arithmetics (when huge test is possible but avoided deliberately) - yes/no
etc...
If you still got W.A., just try 2147483647. The answer is 2147483648. I forgot the internal implicit type conversion such that I got 2 W.As even I used long long int.
Have you ever...
Wanted to work at best companies?
Struggled with interview problems that could be solved in 15 minutes?