Problem A
Av(1324)
Languages
en
is
Five problems ready, and already Arnar and Atli are running
out of ideas. In desperation they start asking other members of
the faculty at RU what problems they should pose for their
students, and after a bit of searching they end up talking to
Henning. He says that “Pattern avoiding permutations” are what
they’re looking for. He says that there is nothing more
interesting than solving the problem of how many permutations
avoid the pattern
That is where you come in! The input gives you a permutation
Input
The first line of the input contains an integer
Output
For each permutation in the input, print a single line. If
the pattern does not appear, print "Ekkert
mynstur!". Otherwise print indices
Scoring
Group |
Points |
Constraints |
1 |
20 |
|
2 |
20 |
|
3 |
25 |
|
4 |
25 |
|
5 |
10 |
|
Sample Input 1 | Sample Output 1 |
---|---|
4 4 1 2 3 4 4 1 3 2 4 10 3 4 2 5 1 6 7 8 10 9 10 8 5 7 2 9 6 3 4 1 10 |
Ekkert mynstur! 1 2 3 4 Ekkert mynstur! 2 3 6 10 |