QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#186827#5545. Contingency PlanZhaoZiLongWA 8ms31900kbC++202.8kb2023-09-24 12:17:272023-09-24 12:17:28

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 29572kb

input:

7
1 2
3 7
2 4
2 5
1 3
3 6

output:

7 2
2 3
7 4
7 5
7 1
7 6

result:

ok AC

Test #2:

score: 0
Accepted
time: 0ms
memory: 30380kb

input:

3
1 2
2 3

output:

-1

result:

ok AC

Test #3:

score: 0
Accepted
time: 3ms
memory: 29960kb

input:

2
2 1

output:

-1

result:

ok AC

Test #4:

score: 0
Accepted
time: 0ms
memory: 29396kb

input:

5
2 1
2 3
2 4
4 5

output:

5 1
5 3
5 2
1 4

result:

ok AC

Test #5:

score: 0
Accepted
time: 0ms
memory: 31900kb

input:

5
1 4
3 4
4 5
2 5

output:

5 1
5 3
2 4
1 2

result:

ok AC

Test #6:

score: 0
Accepted
time: 0ms
memory: 31808kb

input:

5
5 2
1 2
4 2
3 4

output:

4 5
4 1
3 2
5 3

result:

ok AC

Test #7:

score: 0
Accepted
time: 3ms
memory: 31392kb

input:

20000
1 2
1 3
4 1
5 1
6 1
7 1
1 8
1 9
1 10
1 11
12 1
1 13
14 1
1 15
1 16
17 1
1 18
1 19
20 1
21 1
22 1
1 23
24 1
1 25
26 1
1 27
28 1
29 1
30 1
1 31
1 32
1 33
1 34
1 35
36 1
1 37
1 38
1 39
40 1
41 1
1 42
1 43
44 1
1 45
46 1
1 47
48 1
49 1
1 50
1 51
52 1
53 1
54 1
1 55
56 1
57 1
58 1
1 59
60 1
61 1
1 ...

output:

20000 2
20000 3
20000 4
20000 5
20000 6
20000 7
20000 8
20000 9
20000 10
20000 11
20000 12
20000 13
20000 14
20000 15
20000 16
20000 17
20000 18
20000 19
20000 20
20000 21
20000 22
20000 23
20000 24
20000 25
20000 26
20000 27
20000 28
20000 29
20000 30
20000 31
20000 32
20000 33
20000 34
20000 35
20...

result:

ok AC

Test #8:

score: -100
Wrong Answer
time: 8ms
memory: 31896kb

input:

20000
7662 1
9205 1
5971 1
1 9886
1 18853
14108 1
998 1
1 14958
7100 1
1 2670
1 18493
13838 1
4644 1
2139 1
1 18540
1 14081
1 16836
1 9357
245 1
242 1
1 13472
1 1471
3792 1
1 17875
13976 1
1 15085
1 17283
15014 1
17477 1
11578 1
18441 1
1 14367
3018 1
1 7186
1 4939
2470 1
2993 1
6175 1
1 19886
1 125...

output:

20000 7662
20000 9205
20000 5971
20000 9886
20000 18853
20000 14108
20000 998
20000 14958
20000 7100
20000 2670
20000 18493
20000 13838
20000 4644
20000 2139
20000 18540
20000 14081
20000 16836
20000 9357
20000 245
20000 242
20000 13472
20000 1471
20000 3792
20000 17875
20000 13976
20000 15085
20000...

result:

wrong answer cycle detected