刑務所 (Jail)
Unrated
日本語
Language
Contribute a translation- Time limit
- 4000 ms
- Memory limit
- 1024 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
1 8 1 2 2 3 3 4 4 5 5 6 6 7 7 8 2 3 4 4 8
Sample output 1
Yes
Sample input 2
2 7 1 2 2 3 3 4 4 5 3 6 6 7 2 4 1 5 7 4 1 2 1 3 1 4 3 2 3 3 4 4 2
Sample output 2
Yes No
Sample input 3
3 3 1 2 2 3 2 2 1 3 2 7 1 2 2 3 3 4 4 5 5 6 6 7 3 1 3 4 2 2 5 8 1 2 2 3 3 4 4 5 5 6 6 7 7 8 4 1 5 2 6 3 7 4 8
Sample output 3
Yes No Yes
Notes
原典:JOI 2021/2022 春季トレーニング合宿 刑務所 (Jail)、情報オリンピック日本委員会。CC BY-SA 4.0。
Tags
No tags yet