D. Eliens Slurs
time limit per test
11 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
14 3
1 3 2 2 1 5 1 2 1 6 1 2 2 1
1 2 1
Output
5
1 3 7 11 12
Input
5 2
1 300 300 1 299
1 300
Output
2
1 4