Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
1306
已加強測資並 rejudge
2235 . BGP 劫持
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
$\mathbb{W}\mathcal{aimai}\sim$
User's AC Ratio
100.0% (
35/35
)
Submission's AC Ratio
58.6% (
41
/
70
)
Tags
Show solution-related tags
pre-nhspc-2021
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
5 8
5 2
3 1
2 4
5 1
3 2
5 2
1 2
3 5
Sample Output 1
copy
3 5 1 2 4
Sample Input 2
copy
5 5
1 4
3 4
5 2
2 1
5 3
Sample Output 2
copy
-1
Hints
Problem Source
110 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0~1
範例測資
0
2
0~11
$N\le 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
Submit
Back to Top