

A simple Gaussian elimination problem.Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2077 Accepted Submission(s): 632 Problem Description Dragon is studying math. One day, he drew a table with several rows and columns, randomly wrote numbers on each elements of the table. Then he counted the sum of each row and column. Since he thought the map will be useless after he got the sums, he destroyed the table after that. However Dragon's mom came back and found what he had done. She would give dragon a feast if Dragon could reconstruct the table, otherwise keep Dragon hungry. Dragon is so young and so simple so that the original numbers in the table are onedigit number (e.g. 09). Could you help Dragon to do that? Input The first line of input contains only one integer, T(<=30), the number of test cases. Following T blocks, each block describes one test case. There are three lines for each block. The first line contains two integers N(<=500) and M(<=500), showing the number of rows and columns. The second line contains N integer show the sum of each row. The third line contains M integer show the sum of each column. Output Each output should occupy one line. Each line should start with "Case #i: ", with i implying the case number. For each case, if we cannot get the original table, just output: "So naive!", else if we can reconstruct the table by more than one ways, you should output one line contains only: "So young!", otherwise (only one way to reconstruct the table) you should output: "So simple!". Sample Input
Sample Output
Author BJTU Source  
