Skip to content

Shortcut

UnratedFunction
English

Language

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

Statement

Shortcut: original English statement, page 1

Shortcut: original English statement, page 2

Shortcut: original English statement, page 3

Examples

Sample input 1
4 10
10 20 20
0 40 0 30
Sample output 1
80
Sample input 2
9 30
10 10 10 10 10 10 10 10
20 0 30 0 0 40 0 40 0
Sample output 2
110
Sample input 3
4 1
2 2 2
1 10 10 1
Sample output 3
21
Sample input 4
3 3
1 1
1 1 1
Sample output 4
4

Tags

No tags yet

Source

This problem accepts only these languages.

C++20