Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 20131213 17:15:56.
Submit  All submissions  Best solutions  Back to list 
SMPSEQ5  Fun with Sequences (Act 3) 
You are given a sequence of n integers S = s_{1}, s_{2} ... s_{n} and a sequence of m integers Q = q_{1}, q_{2} ... q_{m}.
Please print in ascending order all such i, that s_{i} = q_{i}, i<=n, i<=m.
Input data specification
In the first line you are given one integer 2 <= n <= 100,
and in the following line n integers:
100 <= s_{i} <= 100, s_{i} <= s_{i+1}.
In the third line you are given one integer 2 <= m <= 100,
and in the following line m integers:
100 <= q_{i} <= 100, q_{i} <= q_{i+1}.
Output data specification
The sequence of requested indexes separated by spaces.
Example 1
Input: 5 2 2 1 1 4 6 3 2 1 1 2 3 Output: 2 3 4
Example 2
Input: 5 2 1 3 1 4 5 3 2 1 1 2 Output: 4
Added by:  kuszi 
Date:  20131114 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Public source code since:  20131213 17:15:56 
hide comments
20200430 19:32:04
if the element are common print their index number 

20200430 19:10:27
it should be " print all the numbers which are uncommon in both the array in ascending order." 

20181128 08:00:37
Can anyone explain this problem with example? 

20150601 11:12:14 jarvis
pardon!my mistake! 

20150601 11:10:52 jarvis
wrong testcase :P 

20140527 09:15:35 heman
help!! Last edit: 20140527 09:19:34 

20140118 07:09:06 Shashi Kant Prasad
@Chandrakant Chaturvedi: You should write the C code like int main() { ... return 0; } 

20140116 18:57:26 Chandrakant Chaturvedi
Please let me know my error 