Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 20131213 17:16:52.
Submit  All submissions  Best solutions  Back to list 
SMPSEQ6  Fun with Sequences (Act 4) 
You are given S  a sequence of n integers S = s_{1}, s_{2} ... s_{n}, Q  a sequence of n integers Q = q_{1}, q_{2} ... q_{n} and a nonnegative parameter x.
Please print in ascending order all such i, that s_{i} = q_{i+y}, where x <= y <= x.
Input data specification
In the first line you are given two integers 2 <= n <= 100, 0 <= x < n
and in the following two lines n integers in each of the line:
100 <= s_{i}, q_{i} <= 100
Output data specification
The sequence of requested integers separated by spaces.
Example 1
Input: 5 2 1 2 1 1 1 3 2 1 1 2 Output: 1 3 4 5
Example 2
Input: 6 4 1 2 2 2 2 2 3 2 3 3 3 1 Output: 6
Example 3
Input: 6 0 1 2 10 12 6 2 2 2 10 21 6 1 Output: 3 5
Added by:  kuszi 
Date:  20131115 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Public source code since:  20131213 17:16:52 
hide comments
20180506 11:45:47
I am unable to see my rank in "rankings". 

20160513 10:24:24
Last edit: 20160513 10:27:16 