You are given multiple unsorted lists of numbers: the 1st list has N numbers, the 2nd list has (N–1) numbers, the 3rd list has (N–2) number, and the i-th list has (N–i+1) numbers. One and only one number in the i-th list is missing in the (i+1)-th list. Your task is to find the missing numbers from list to list.
The first line contains two numbers, M and N (M < N and M*N ≤ 5,000,000), where M is the number of lists and N is the number of integers in the 1st list. The following M lines are simply the M unsorted lists of integers, each list on a separate line and all integers smaller than 65,536.
Print the missing numbers from list to list; in other words, print the number which is in the 1st list but not in the 2nd list, then the number which is in the 2nd list but not in the 3rd list, and so on so forth, each number on a separate line. Totally there will be (M–1) numbers printed.
範例輸入 1
3 5 13766 1891 5370 24317 30676 13766 5370 30676 24317 24317 5370 13766
範例輸出 1
1891 30676
Pro 專屬功能: 查看這題在歷屆 CPE 出現過幾次 — 升級以解鎖.