QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#880913#8671. 分流器ucup-team340735 466ms310784kbC++146.2kb2025-02-04 00:04:452025-02-04 00:04:45

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 3584kb

input:

5
2 3
4 5
4 5
5 6
6 6
0 0 0 0 0

output:

8

result:

ok single line: '8'

Test #2:

score: 5
Accepted
time: 1ms
memory: 5832kb

input:

5
2 3
4 5
4 5
6 6
6 6
0 0 0 0 0

output:

4

result:

ok single line: '4'

Test #3:

score: 5
Accepted
time: 0ms
memory: 5832kb

input:

5
2 3
4 5
6 5
5 5
6 6
0 1 0 0 0

output:

8

result:

ok single line: '8'

Test #4:

score: 5
Accepted
time: 0ms
memory: 3840kb

input:

5
2 3
4 5
6 6
5 5
6 6
0 0 1 1 1

output:

8

result:

ok single line: '8'

Test #5:

score: 5
Accepted
time: 0ms
memory: 3840kb

input:

5
2 3
4 5
6 6
5 5
6 6
0 0 0 1 0

output:

8

result:

ok single line: '8'

Subtask #2:

score: 15
Accepted

Dependency #1:

100%
Accepted

Test #6:

score: 15
Accepted
time: 0ms
memory: 5832kb

input:

20
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
12 19
21 21
15 16
18 18
21 21
19 21
18 21
21 19
20 20
21 21
1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1

output:

128

result:

ok single line: '128'

Test #7:

score: 15
Accepted
time: 0ms
memory: 3840kb

input:

20
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
19 15
21 21
21 20
21 19
21 17
21 20
18 21
20 20
21 21
21 21
1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 0

output:

128

result:

ok single line: '128'

Test #8:

score: 15
Accepted
time: 0ms
memory: 3712kb

input:

20
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
21 16
19 13
19 17
20 17
17 20
21 21
20 18
19 21
20 21
21 21
1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0

output:

512

result:

ok single line: '512'

Test #9:

score: 15
Accepted
time: 0ms
memory: 5828kb

input:

20
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
21 18
18 21
19 15
21 20
21 17
20 21
18 19
21 21
20 21
21 21
1 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0

output:

256

result:

ok single line: '256'

Subtask #3:

score: 15
Accepted

Test #10:

score: 15
Accepted
time: 463ms
memory: 310784kb

input:

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

output:

8589934592

result:

ok single line: '8589934592'

Test #11:

score: 15
Accepted
time: 445ms
memory: 310728kb

input:

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

output:

34359738368

result:

ok single line: '34359738368'

Test #12:

score: 15
Accepted
time: 466ms
memory: 310656kb

input:

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

output:

8589934592

result:

ok single line: '8589934592'

Subtask #4:

score: 0
Runtime Error

Dependency #2:

100%
Accepted

Test #13:

score: 20
Accepted
time: 0ms
memory: 3968kb

input:

100
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
22 23
24 25
26 27
28 25
29 30
31 21
32 33
34 19
35 34
36 37
38 39
40 41
42 43
44 45
46 47
48 101
49 44
50 51
51 50
51 52
53 54
55 56
57 58
47 59
60 37
59 101
61 62
46 63
64 65
66 67
101 54
68 69
58 101
70 101
71 72
73 101
101 74
65 75
76 101
77...

output:

32768

result:

ok single line: '32768'

Test #14:

score: 20
Accepted
time: 0ms
memory: 4224kb

input:

100
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
22 23
24 25
26 27
28 29
30 31
32 33
34 34
35 36
37 36
22 38
39 39
40 41
42 43
31 44
45 46
47 48
30 49
50 51
52 53
49 101
54 55
56 57
58 59
60 46
58 61
62 101
47 42
101 63
61 61
64 65
51 66
67 68
47 69
70 71
72 73
101 74
75 76
77 78
79 80
101 60...

output:

32768

result:

ok single line: '32768'

Test #15:

score: 20
Accepted
time: 1ms
memory: 4224kb

input:

100
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
22 23
24 25
26 27
28 29
101 30
23 31
32 33
34 35
36 37
38 101
39 40
41 42
43 44
45 46
47 48
49 43
30 34
50 51
46 52
53 54
55 56
101 57
58 44
59 39
42 60
42 61
49 62
63 64
65 66
41 57
54 67
68 69
70 71
51 72
73 57
56 101
57 74
75 76
77 101
78 10...

output:

65536

result:

ok single line: '65536'

Test #16:

score: 0
Runtime Error

input:

100
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
22 23
24 25
26 27
28 29
30 31
32 33
101 34
35 36
37 38
39 40
41 42
43 44
45 26
46 47
48 27
49 50
51 33
52 53
52 54
55 56
56 34
57 57
58 59
101 60
61 39
62 63
64 55
65 66
67 68
101 69
50 58
70 71
72 101
73 74
75 76
77 78
79 80
81 54
82 83
69 84
...

output:


result:


Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Runtime Error

Test #29:

score: 0
Runtime Error

input:

50000
2 3
4 5
6 7
8 9
10 11
12 13
14 15
16 17
18 19
20 21
22 23
24 25
26 27
28 29
30 31
32 33
34 35
36 37
38 39
40 41
42 43
44 50001
45 46
47 48
49 50001
40 50
51 40
52 53
54 55
56 57
58 59
60 61
57 39
62 63
64 65
66 67
50001 68
69 54
50001 70
71 72
73 74
75 76
77 47
77 73
78 79
52 76
80 68
81 82
83...

output:


result:


Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%