ボードゲーム (Board Game)
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
5 5 2 1 2 2 3 2 4 3 5 4 5 00000 1 5
Sample output 1
0 1 2 2 3
Sample input 2
5 5 2 1 2 2 3 2 4 3 5 4 5 01000 1 5
Sample output 2
0 1 4 4 5
Sample input 3
5 5 2 1 2 2 3 2 4 3 5 4 5 01100 1 5
Sample output 3
0 1 3 3 4
Sample input 4
8 7 5 1 3 5 7 4 6 2 6 2 3 7 8 1 5 10011010 4 6 4 7 1
Sample output 4
4 2 3 0 10 1 17 24
Sample input 5
12 13 3 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 1 10 2 9 7 12 11 12 110000011101 1 9 11
Sample output 5
0 1 4 5 6 7 8 8 4 1 13 9
Notes
JOI 2023/2024 ボードゲーム · JCIOI · CC BY-SA 4.0
Tags
No tags yet