Coins Game

Problem Number: 
54
Type of Problem: 
Problem Category: 
Input: 
Critical Input
0
0
Critical Input: 
20 787 42 42 7 4 2 1 1000000 1000 1000000 10 1 843139 399718 227764 1 3 1 999999 1000000 999999 1000 1000000 1337 3 4 4 1000000 500000 1 1000000 1000000 1000000 1000 12345 12340 226147 298339 251609 8 5 2 3 6 4 999999 1000000 1000000 497 999999 999999 1 1 1 8 4 1 10 55 55
Random Input: 
Problem Id: 
54