QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#123463#5655. Train SplittingGuanYunchangWA 11ms3816kbC++171.6kb2023-07-12 16:48:492023-07-12 16:49:15

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3604kb

input:

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

output:

3
1 1 1 3 2 2 2 2 2 
3
1 3 2 

result:

ok OK (2 test cases)

Test #2:

score: 0
Accepted
time: 11ms
memory: 3608kb

input:

100
50 1225
15 33
19 23
14 8
23 26
5 46
22 8
22 13
16 10
20 12
32 16
2 5
36 43
20 33
35 8
4 11
15 43
4 26
33 1
25 36
49 6
11 2
35 11
39 20
24 7
41 2
10 9
40 49
27 17
26 11
49 39
46 27
24 44
26 34
6 27
25 22
9 46
29 43
50 43
2 37
37 10
28 5
14 5
23 28
37 40
10 45
9 26
23 29
35 47
32 21
16 11
9 50
50 ...

output:

3
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

result:

ok OK (100 test cases)

Test #3:

score: 0
Accepted
time: 2ms
memory: 3812kb

input:

554
8 7
1 3
5 3
6 2
3 6
4 6
7 5
8 7
8 7
7 3
3 4
7 1
2 8
1 5
7 6
5 2
10 9
10 1
8 10
4 10
3 10
10 5
6 10
2 10
7 10
10 9
8 7
2 5
1 2
3 6
6 7
8 2
2 7
5 4
10 9
9 6
3 4
5 1
2 5
7 10
3 10
2 6
8 9
1 7
9 8
6 7
1 7
7 5
2 7
3 7
7 9
4 7
7 8
9 8
7 5
4 1
8 6
5 2
4 9
6 1
7 8
2 3
8 7
8 3
7 6
7 1
1 8
4 5
3 2
5 6
8 7...

output:

2
1
2
2
2
2
2
2

2
2
2
1
2
1
2
2

2
1
2
2
2
2
2
2
2
2

2
2
1
2
2
2
2
2

2
2
2
1
2
2
2
2
2
1

2
2
1
2
2
2
2
2
2

2
2
1
2
2
2
1
2
2

2
2
2
1
1
2
2
2

2
1
2
2
2
1
2
2

2
2
2
1
1
2
2
2
2

2
2
1
2
2
2
2
1

2
2
2
2
2
2
2
2
2
1

2
2
2
2
1
1
2
2
2
2

2
2
2
2
2
2
2
2
2
1

2
2
1
2
2
2
2
2
2
2

2
2
2
2
1
2
2
2...

result:

ok OK (554 test cases)

Test #4:

score: 0
Accepted
time: 2ms
memory: 3816kb

input:

112
42 41
7 36
24 7
7 42
7 8
15 7
20 7
10 7
7 21
27 7
7 39
40 7
23 7
7 3
7 5
7 35
7 33
7 28
16 7
1 7
7 14
41 7
29 7
12 7
11 7
37 7
25 7
13 7
6 7
7 32
9 7
7 18
4 7
7 22
19 7
34 7
7 2
30 7
31 7
17 7
7 26
7 38
46 45
39 26
23 35
29 7
21 37
27 9
35 10
12 41
40 36
10 9
36 42
41 16
4 16
32 43
13 43
29 45
4...

output:

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
1
2
2
2

2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2...

result:

ok OK (112 test cases)

Test #5:

score: -100
Wrong Answer
time: 2ms
memory: 3624kb

input:

740
3 2
3 2
1 3
3 3
3 1
1 2
2 3
4 3
4 1
1 2
1 3
4 4
2 1
2 3
4 2
4 3
4 3
2 3
1 3
1 4
4 5
3 1
3 2
1 2
4 1
3 4
4 4
1 4
3 4
3 2
1 2
4 6
1 4
3 4
2 4
2 3
2 1
1 3
5 4
2 3
4 2
1 2
2 5
5 5
1 2
3 5
4 5
5 1
5 2
5 6
2 3
4 1
1 2
1 5
1 3
2 4
5 4
2 1
3 4
3 5
3 1
5 5
4 3
2 5
3 2
3 5
1 2
5 7
2 1
5 4
5 3
1 3
5 1
4 1
...

output:

2
2
1

3
1 3 2 
2
2
1
1

2
1
2
2
2

2
2
1
1

3
1 2 1 3 2 
2
1
2
2
1

3
1 2 2 2 1 3 
2
2
2
1
2

2
1
2
2
1
2

3
2 1 1 1 3 2 
2
1
2
2
1

2
2
2
2
2
1

3
1 2 2 1 1 3 2 
2
2
1
2
2
2
2
2

2
2
2
2
2
2
1
1
1

2
2
1
2
1

2
2
1
2
2
1
1

3
1 2 1 2 1 2 3 
2
1
2
1
2
1

2
1
1
2
2
2
2
2
2
1

2
2
2
1
2
1

2
1
2
1
2
...

result:

wrong answer colors 2 and 3 are not connected (test case 11)