Problem E
Stupid Sequence
Input: Standard Input
Output: Standard Output
So the stupid sequence is actually f(1), f(2), f(3), f(4)…
You can assume that for all i (), .
In this problem you will be given the first 1500 terms of stupid sequence, and you will have to find the values of .
First line of the input file contains an integer N (0<N<101) which denotes the total number of input set. The description of each set is given below:
Each set contains 1500 lines of inputs. Each line contains a single integer. The i-th line of a set denotes the i-th element of a stupid sequence. All these integers fit in 64-bit unsigned integer. There is a blank line after the input of each set.
For each set of input produce one line of output. This line contains the values of . All these values are non-negative and less than 1001. If such values are not found print a line “This is a smart sequence!” instead.
//Too large to paste here so //download from the
link above |
1 0 0 0 0 0 0 0 1 1 0 0 0 0 This is a smart sequence! |
Problemsetter: Shahriar Manzoor
Special Thanks: Abdullah al Mahmud