TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

User's AC Ratio

100.0% (20/20)

Submission's AC Ratio

63.6% (28/44)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

2 1 3

Sample Input 2

6 4
11 20 14 30 5 1
1 2 4 5
0 3 4 1

Sample Output 2

-1

Hints

Problem Source

113 學年度全國資訊學科能力競賽模擬賽

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 2~6 $N \le 10, M \le 10$ 15
3 7~11 $s_i=0$ 25
4 0~18 無額外限制 60

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1500 524288 65536 1 4
1 1500 524288 65536 1 4
2 1500 524288 65536 2 4
3 1500 524288 65536 2 4
4 1500 524288 65536 2 4
5 1500 524288 65536 2 4
6 1500 524288 65536 2 4
7 1500 524288 65536 3 4
8 1500 524288 65536 3 4
9 1500 524288 65536 3 4
10 1500 524288 65536 3 4
11 1500 524288 65536 3 4
12 1500 524288 65536 4
13 1500 524288 65536 4
14 1500 524288 65536 4
15 1500 524288 65536 4
16 1500 524288 65536 4
17 1500 524288 65536 4
18 1500 524288 65536 4