Best Friend

Problem Number: 
12 425
Type of Problem: 
Problem Category: 
Input: 
Random Input
Critical Input
0
Critical Input: 
1 1000000000000 2 800000 1000000
Random Input: 
3 30006 3 1 87294323899 783478434 1000000000000 4 1 2 -9000000 9000000000000 84398289202 6 297498 934242432 10000238934 -8888 347647667 0
Problem Id: 
12425