Skip to content

かかし 2 (Scarecrows 2)

Unrated
日本語

Language

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

Statement

かかし 2:公式日本語問題文 1ページ

かかし 2:公式日本語問題文 2ページ

かかし 2:公式日本語問題文 3ページ

かかし 2:公式日本語問題文 4ページ

Examples

Sample input 1
7 1
2 45 21 96
1 5 85 70
1 36 73 78
1 28 12 80
2 15 49 21
1 45 11 96
2 63 26 19
Sample output 1
99
Sample input 2
7 3
2 45 21 96
1 5 85 70
1 36 73 78
1 28 12 80
2 15 49 21
1 45 11 96
2 63 26 19
Sample output 2
-1
Sample input 3
19 5
2 36 42 64
2 7 89 74
1 0 15 82
1 10 63 55
2 58 28 19
2 45 91 3
2 2 34 97
1 7 55 82
1 17 12 17
2 59 76 82
1 7 4 68
2 51 98 47
1 51 21 38
2 19 0 72
1 73 73 11
2 62 19 74
1 45 7 94
1 79 32 21
1 85 50 21
Sample output 3
315
Sample input 4
8 3
4 4 21 80
2 59 65 69
4 63 36 3
2 29 13 23
1 37 45 95
2 79 14 89
3 91 54 76
1 85 46 62
Sample output 4
328

Notes

Tags

No tags yet

Source