|
||||||||||
Boys and girlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1295 Accepted Submission(s): 382 Problem Description In a big party,there are N people some are boys and the others are girls.Now we will ask them how many girls can they see around the party(expect themselves).And the number will be A1,A2,A3...AN.Then can you tell the total number of girls using the information above?If the information is wrong and doesn't correspond to a unique valid situation,just output"Impossible!". Input The first line will contain a integer T,then T cases. At first,there is a integer N,means N people(1<=N<10000),then N integers A1,A2...AN,indicating how many girls he/she sees(except himself/hersels). Output If the information correspond to a valid situation,output the number of people,otherwise output"Impossible!". Sample Input
Sample Output
Author Teddy Source | ||||||||||
|