#2847. C++-GESP 2023-12认证四级-编程题02(田忌赛马)

C++-GESP 2023-12认证四级-编程题02(田忌赛马)

Background

Description

image

image

Format

Input

Output

Samples

3
1 3 5
2 4 6
2
5
10 3 5 8 7
4 6 1 2 9
5

Limitation

1s, 1024KiB for each test case.