prelude_to_self-describing_sequence
This is an old revision of the document!
Table of Contents
Prelude to Self-describing Sequence
First, start by reading the problem statement for Self-describing Sequence. The input format is the same.
Input
Like Pairsumonious Numbers, the input is a sequence of test cases, one per line. The first number on the line is N, followed by N*(N-1)/2 additional numbers.
Output
Print a line of output for each line of input. The first number on the line is N*(N-1)/2, followed by the N*(N-1)/2 input numbers in sorted order, from lowest to highest.
Sample Input
3 1269 1160 1663 3 1 1 1 5 226 223 225 224 227 229 228 226 225 227 5 216 210 204 212 220 214 222 208 216 210 5 -1 0 -1 -2 1 0 -1 1 0 -1 5 79950 79936 79942 79962 79954 79972 79960 79968 79924 79932
Sample Output
3 1160 1269 1663 3 1 1 1 10 223 224 225 225 226 226 227 227 228 229 10 204 208 210 210 212 214 216 216 220 222 10 -2 -1 -1 -1 -1 0 0 0 1 1 10 79924 79932 79936 79942 79950 79954 79960 79962 79968 79972
prelude_to_self-describing_sequence.1316524276.txt.gz · Last modified: 2011/09/20 06:11 by jtkorb