遺産相続 (Inheritance)
Unrated
日本語
Language
Contribute a translation- Time limit
- 1000 ms
- Memory limit
- 256 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
3 5 2 1 2 3 1 2 1 2 3 4 2 3 6 1 3 2
Sample output 1
1 0 2 1 2
Sample input 2
3 6 5 1 2 1 1 2 2 2 3 3 2 3 4 3 1 5 3 1 6
Sample output 2
4 3 2 1 2 1
Notes
JOI 2014/2015 遺産相続 (Inheritance) · JCIOI · CC BY-SA 4.0
Tags
No tags yet