JOI 国のお祭り事情 3 (Festivals in JOI Kingdom 3)
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
7 1 2 30 2 3 30 1 4 70 2 5 20 1 6 10 2 7 50 2 3 0 0 0 1 0 8 3 1 1 6 0 3 1 2 6 10 3 1 1 2 7 1 6 7 3 1
Sample output 1
80 70 60 -1
Sample input 2
6 1 2 10 1 3 30 1 4 50 1 5 30 1 6 10 2 0 0 0 0 1 10 3 1 2 3 20 3 1 1 6 0 3 1 1 1 4 3 1 1 2 6 1 3 6 3 1
Sample output 2
30 20 10 30 -1
Notes
JOI 2025/2026 JOI 国のお祭り事情 3 · JCIOI · CC BY-SA 4.0
Tags
No tags yet