TopCoder

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

User's AC Ratio

100.0% (32/32)

Submission's AC Ratio

56.7% (38/67)

Tags

Description

Input Format

Output Format

Sample Input 1

5 8
5 2
3 1
2 4
5 1
3 2
5 2
1 2
3 5

Sample Output 1

3 5 1 2 4

Sample Input 2

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

Sample Output 2

-1

Hints

Problem Source

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

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資。 0
2 0~11 N <= 20 17
3 0~31 無額外限制。 83

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 2000 524288 65536 1 2 3
1 2000 524288 65536 1 2 3
2 2000 524288 65536 2 3
3 2000 524288 65536 2 3
4 2000 524288 65536 2 3
5 2000 524288 65536 2 3
6 2000 524288 65536 2 3
7 2000 524288 65536 2 3
8 2000 524288 65536 2 3
9 2000 524288 65536 2 3
10 2000 524288 65536 2 3
11 2000 524288 65536 2 3
12 2000 524288 65536 3
13 2000 524288 65536 3
14 2000 524288 65536 3
15 2000 524288 65536 3
16 2000 524288 65536 3
17 2000 524288 65536 3
18 2000 524288 65536 3
19 2000 524288 65536 3
20 2000 524288 65536 3
21 2000 524288 65536 3
22 2000 524288 65536 3
23 2000 524288 65536 3
24 2000 524288 65536 3
25 2000 524288 65536 3
26 2000 524288 65536 3
27 2000 524288 65536 3
28 2000 524288 65536 3
29 2000 524288 65536 3
30 2000 524288 65536 3
31 2000 524288 65536 3