京都観光 (Sightseeing in Kyoto)
Unrated
日本語
Language
Contribute a translation- Time limit
- 2000 ms
- Memory limit
- 1024 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
2 2 1 3 2 5
Sample output 1
5
Sample input 2
5 5 7 1 5 2 8 7 2 4 1 6
Sample output 2
20
Sample input 3
4 6 454863204 543362989 866044086 813602010 71574269 17945210 688720933 392135202 38174709 168241720
Sample output 3
2737473954
Notes
原典:JOI 2021/2022 春季トレーニング合宿 京都観光 (Sightseeing in Kyoto)、情報オリンピック日本委員会。CC BY-SA 4.0。
Tags
No tags yet