TopCoder

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

User's AC Ratio

100.0% (1/1)

Submission's AC Ratio

100.0% (1/1)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

YES
4 8 7 6 3

Sample Input 2

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

Sample Output 2

NO

Hints

Problem Source

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

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 2~18 $M=N-1$ 5
3 19~34 $M=N$ 且每座城市都恰有兩條道路通往另外兩座城市 9
4 35~47 $N\le 3000,M\le 5000$ 23
5 0~64 無額外限制 63

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 524288 65536 1 5
1 3000 524288 65536 1 5
2 3000 524288 65536 2 5
3 3000 524288 65536 2 5
4 3000 524288 65536 2 5
5 3000 524288 65536 2 5
6 3000 524288 65536 2 5
7 3000 524288 65536 2 5
8 3000 524288 65536 2 5
9 3000 524288 65536 2 5
10 3000 524288 65536 2 5
11 3000 524288 65536 2 5
12 3000 524288 65536 2 5
13 3000 524288 65536 2 5
14 3000 524288 65536 2 5
15 3000 524288 65536 2 5
16 3000 524288 65536 2 5
17 3000 524288 65536 2 5
18 3000 524288 65536 2 5
19 3000 524288 65536 3 5
20 3000 524288 65536 3 5
21 3000 524288 65536 3 5
22 3000 524288 65536 3 5
23 3000 524288 65536 3 5
24 3000 524288 65536 3 5
25 3000 524288 65536 3 5
26 3000 524288 65536 3 5
27 3000 524288 65536 3 5
28 3000 524288 65536 3 5
29 3000 524288 65536 3 5
30 3000 524288 65536 3 5
31 3000 524288 65536 3 5
32 3000 524288 65536 3 5
33 3000 524288 65536 3 5
34 3000 524288 65536 3 5
35 3000 524288 65536 4 5
36 3000 524288 65536 4 5
37 3000 524288 65536 4 5
38 3000 524288 65536 4 5
39 3000 524288 65536 4 5
40 3000 524288 65536 4 5
41 3000 524288 65536 4 5
42 3000 524288 65536 4 5
43 3000 524288 65536 4 5
44 3000 524288 65536 4 5
45 3000 524288 65536 4 5
46 3000 524288 65536 4 5
47 3000 524288 65536 4 5
48 3000 524288 65536 5
49 3000 524288 65536 5
50 3000 524288 65536 5
51 3000 524288 65536 5
52 3000 524288 65536 5
53 3000 524288 65536 5
54 3000 524288 65536 5
55 3000 524288 65536 5
56 3000 524288 65536 5
57 3000 524288 65536 5
58 3000 524288 65536 5
59 3000 524288 65536 5
60 3000 524288 65536 5
61 3000 524288 65536 5
62 3000 524288 65536 5
63 3000 524288 65536 5
64 3000 524288 65536 5