鉄道旅行 (Railway Trip)
Unrated
日本語
Language
Contribute a translation- Time limit
- 2000 ms
- Memory limit
- 512 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
9 3 3 3 1 1 1 2 2 2 3 3 2 4 4 9 6 7
Sample output 1
1 3 0
Sample input 2
5 2 1 2 1 1 1 2 1 4
Sample output 2
1
Sample input 3
15 5 15 5 4 1 2 3 1 1 2 4 5 4 1 5 3 5 8 1 11 1 5 3 6 11 9 12 15 14 15 2 3 12 2 1 4 8 15 5 12 6 1 13 13 8 14 9
Sample output 3
2 1 1 3 2 0 3 4 0 1 3 4 1 2 2
Notes
Tags
No tags yet