A. BFS = DFS?
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Example
Input
4
1 3 2 4
Output
2