長距離バス (Long Distance Coach)
Unrated
日本語
Language
Contribute a translation- Time limit
- 2000 ms
- Memory limit
- 256 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
19 1 4 8 7 10 1 20 2 10 4 5 6 5
Sample output 1
103
Sample input 2
105 3 5 9 10 59 68 71 4 71 6 32 7 29 3 62 2 35
Sample output 2
547
Sample input 3
1000000000000 1 1 1000000 6 999999259244 1 123456789
Sample output 3
333333209997456789
Notes
Tags
No tags yet