#2581. C++-GESP 2023-06认证三级-编程题01(春游)

C++-GESP 2023-06认证三级-编程题01(春游)

Background

Description

image

image

Format

Input

Output

Samples

3 3
0 2 1
3
3 5
0 0 0 0 0
1 2

Limitation

1s, 1024KiB for each test case.