Codeforces Round 649 (Div. 2)


A. XXXXX
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
3 3
1 2 3
3 4
1 2 3
2 2
0 6
Output
2
3
-1
----------------------------------------------------------------------------------------------------
B. Most socially-distanced subsequence
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
3
3 2 1
4
1 3 4 2
Output
2
3 1 
3
1 4 2 
----------------------------------------------------------------------------------------------------
C. Ehab and Prefix MEXs
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 3
Output
0 1 2 
Input
4
0 0 0 2
Output
1 3 4 0 
Input
3
1 1 3
Output
0 2 1 
----------------------------------------------------------------------------------------------------
D. Ehab's Last Corollary
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 4 3
1 2
2 3
3 4
4 1
Output
1
1 3 
Input
4 5 3
1 2
2 3
3 4
4 1
2 4
Output
2
3
2 3 4 
Input
4 6 3
1 2
2 3
3 4
4 1
1 3
2 4
Output
2
3
1 2 3 
Input
5 4 5
1 2
1 3
2 4
2 5
Output
1
1 4 5 
----------------------------------------------------------------------------------------------------
E. X-OR
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1
3
2
Output
? 1 2
? 1 3
? 2 3
! 1 0 2
----------------------------------------------------------------------------------------------------
