Skip to content

The Troublesome Frog

UnratedLanguage limit
English

Language

Contribute a translation
Time limit
2000 ms
Memory limit
64 MB (no extra memory)
Submissions
0
Correct
0
Solved by
0
AC rate
—

Statement

The Troublesome Frog

The Troublesome Frog

The Troublesome Frog

Examples

Sample input 1
6 7
14
2 1
6 6
4 2
2 5
2 6
2 7
3 4
6 1
6 2
2 3
6 3
6 4
6 5
6 7
Sample output 1
7
Sample input 2
6 7
18
1 1
6 2
3 5
1 5
4 7
1 2
1 4
1 6
1 7
2 1
2 3
2 6
4 2
4 4
4 5
5 4
5 5
6 6
Sample output 2
4

Tags

No tags yet

Source

This problem accepts only these languages.

C++20