移住計画 (Migration Plan)
Unrated
日本語
Language
Contribute a translation- Time limit
- 7500 ms
- Memory limit
- 2048 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
4 1 1 2 1 3 4 3 6 3 1 1 1 0 3 1 3 2 1 2 1 3 2
Sample output 1
1 8 0 3
Sample input 2
3 1 1 3 1 4 11 2 2 5 1 2 0 3 1 1 1 0 3 1 3 2 2 3 4 3 3 1 1 0 3 3 3 1
Sample output 2
3 13 0 4 0 17
Sample input 3
7 1 2 1 3 3 2 5 2 8 9 4 0 5 10 1 3 1 2 4 10 3 2 1 6 3 1 2 0 3 1 3 4 2 5 6 3 5 3 3
Sample output 3
6 18 19 6 0
Notes
JOI 2024/2025 移住計画 · JCIOI · CC BY-SA 4.0
Tags
No tags yet