指定都市 (Designated Cities)
Unrated
日本語
Language
Contribute a translation- Time limit
- 2000 ms
- Memory limit
- 512 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
4 1 2 1 2 1 3 3 4 1 4 5 6 2 1 2
Sample output 1
9 1
Sample input 2
5 1 3 13 6 5 1 17 8 5 2 6 10 1 4 16 11 1 1
Sample output 2
36
Sample input 3
6 1 6 6 12 6 2 5 16 1 4 13 4 5 1 19 3 3 1 9 13 1 2
Sample output 3
14
Sample input 4
15 14 5 12 7 14 12 6 5 14 10 14 16 9 14 16 12 13 7 4 15 1 3 8 1 6 7 15 13 15 4 4 6 9 1 12 6 13 1 7 6 13 4 5 15 2 6 11 19 8 4 12 7 13 11 14 5 3 3 6 7
Sample output 4
44 12 6
Notes
原典:JOI 2018/2019 春季トレーニング合宿 指定都市 (Designated Cities)、情報オリンピック日本委員会。CC BY-SA 4.0。
Tags
No tags yet