港湾設備 (Port Facility)
Unrated
日本語
Language
Contribute a translation- Time limit
- 3500 ms
- Memory limit
- 1024 MB
- Submissions
- 0
- Correct
- 0
- Solved by
- 0
- AC rate
- —
Statement
Examples
Sample input 1
4 1 3 2 5 4 8 6 7
Sample output 1
4
Sample input 2
3 1 4 2 5 3 6
Sample output 2
0
Sample input 3
5 1 4 2 10 6 9 7 8 3 5
Sample output 3
8
Sample input 4
8 1 15 2 5 3 8 4 6 14 16 7 9 10 13 11 12
Sample output 4
16
Notes
Tags
No tags yet