Skip to content

Sky Walking

UnratedFunction
English

Language

Contribute a translation
Time limit
4000 ms
Memory limit
1024 MB
Submissions
0
Correct
0
Solved by
0
AC rate
—

Statement

Sky Walking: original English statement, page 1

Sky Walking: original English statement, page 2

Sky Walking: original English statement, page 3

Examples

Sample input 1
7 7
0 8
3 7
5 9
7 7
10 6
12 6
14 9
0 1 1
0 2 6
0 6 8
2 3 1
2 6 7
3 4 2
4 6 5
1 5
Sample output 1
27
Sample input 2
5 3
0 6
4 6
5 6
6 6
9 6
3 4 1
1 3 3
0 2 6
0 4
Sample output 2
21

Tags

No tags yet

Source

This problem accepts only these languages.

C++20