Skip to content

Mission Improbable

Unrated
English

Language

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

Statement

Mission Improbable, original English page 1

Mission Improbable, original English page 2

Examples

Sample input 1
5 5
1 4 0 5 2
2 1 2 0 1
0 2 3 4 4
0 3 0 3 1
1 2 2 1 1
Sample output 1
9
Sample input 2
2 3
50 20 3
20 10 3
Sample output 2
30

Tags

No tags yet

Source