QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#749274#9719. Fracture RayI_be_wannaAC ✓5845ms219528kbC++2011.2kb2024-11-14 23:18:322024-11-14 23:18:34

详细

Test #1:

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

input:

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

output:

Case #1:
2 1 3
1 4

result:

ok 3 lines

Test #2:

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

input:

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

output:

Case #1:
1 3
0
0
0
1 6
0
0
0
0
0

result:

ok 11 lines

Test #3:

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

input:

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

output:

Case #1:
0
0
1 6
0
0
0
0
2 4 5
0
0
Case #2:
1 5
0
0
0
0
0
0
0

result:

ok 20 lines

Test #4:

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

input:

2
6 9
6 6 6 5
4 5 4 7
10 3 10 0
1 4 1 5
2 4 0 4
4 4 6 4
2 1 0 0
0 0 0 3
10 0 0 2
0 5 0 0
9 5 1 1
3 3 0 0
3 8 0 2
9 3 0 2
8 3 0 2
5 7
8 3 10 3
2 0 1 0
7 7 10 7
5 7 4 7
2 1 4 1
1 9 1 3
7 9 1 3
9 8 1 1
3 5 1 2
10 10 1 1
7 3 1 2
4 6 0 1

output:

Case #1:
0
1 6
1 3
2 4 5
0
0
0
0
1 1
Case #2:
0
0
1 3
0
0
0
0

result:

ok 18 lines

Test #5:

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

input:

2
15 18
4 6 4 7
8 7 10 7
4 2 4 4
6 3 5 3
4 6 6 6
6 10 6 8
3 0 3 3
0 7 0 4
7 10 8 10
2 3 3 3
9 3 9 1
9 6 9 5
9 7 9 9
7 3 7 0
8 9 5 9
1 0 1 2
7 7 0 2
10 7 0 3
4 1 1 2
9 5 0 3
9 8 0 0
2 7 1 2
10 2 0 3
1 5 1 1
6 7 0 2
6 7 1 1
2 5 1 3
7 9 1 3
2 1 0 0
3 9 0 0
10 1 0 0
6 1 0 1
2 6 1 2
16 18
0 7 0 9
7 3 7 6...

output:

Case #1:
0
4 6 15 2 13
0
2 7 3
0
0
0
0
1 8
0
3 5 1 9
0
0
0
0
0
0
0
Case #2:
2 2 9
1 15
2 6 7
0
0
1 11
2 4 10
0
0
0
0
4 5 16 13 12
0
0
0
0
0
0

result:

ok 38 lines

Test #6:

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

input:

2
19 6
8 0 5 0
5 9 7 9
4 2 4 3
8 1 9 1
6 7 6 4
9 3 9 2
5 4 8 4
8 9 8 6
3 3 3 4
5 10 3 10
9 7 8 7
0 8 0 9
7 2 7 4
1 4 1 6
3 7 6 7
5 5 5 2
0 7 1 7
8 6 10 6
3 2 0 2
0 7 1 0
6 9 1 1
3 5 1 1
4 7 1 3
9 8 1 2
2 1 1 1
16 10
7 1 5 1
10 9 10 6
6 5 6 7
2 8 2 6
7 0 7 1
7 8 9 8
10 0 10 1
3 5 5 5
5 0 2 0
1 3 1 4
...

output:

Case #1:
2 17 10
1 2
0
0
0
0
Case #2:
1 9
0
0
0
0
1 1
0
2 12 10
5 8 3 15 4 16
0

result:

ok 18 lines

Test #7:

score: 0
Accepted
time: 3870ms
memory: 137988kb

input:

2
99995 99997
3033 4957 3563 4957
520 4960 1864 4960
9021 6598 7061 6598
8277 657 5170 657
7058 1427 9953 1427
2861 2756 2861 1633
221 7256 221 6682
5232 9549 5232 9340
1096 3932 918 3932
1102 2087 1102 2559
5323 5797 5323 6928
7084 5673 7332 5673
5995 1355 3982 1355
5596 7809 5596 9476
8144 8937 55...

output:

Case #1:
159 72670 14497 36956 80337 47855 79259 25733 18524 21986 7866 13759 248 5842 41015 7116 33135 6083 16930 21815 67511 80700 53128 33406 38845 63704 43425 11133 80395 49259 29548 70298 46779 12002 42076 36928 30854 41548 19846 30258 364 39331 20748 275 3016 30406 1563 82798 32955 84571 80615...

result:

ok 199995 lines

Test #8:

score: 0
Accepted
time: 5376ms
memory: 199800kb

input:

2
99997 99999
93081 80981 89570 80981
43783 68092 43783 68096
24444 75949 7239 75949
22160 86189 28010 86189
9020 94289 9020 74953
37656 52157 29626 52157
35882 32689 25513 32689
28555 85455 28555 63883
32506 46975 32506 56038
40782 78349 58647 78349
38823 67162 68416 67162
42441 92087 42827 92087
9...

output:

Case #1:
29273 26091 50429 65957 51898 84892 79477 21457 12179 33860 19203 25615 68696 97774 83105 52616 19135 35826 16466 64315 98412 62955 58174 45824 9784 47488 9811 43166 71330 45951 84345 29989 33386 13719 82463 50907 16128 94197 31991 95408 74301 37840 95856 38231 9023 81703 85077 11500 52973 ...

result:

ok 199999 lines

Test #9:

score: 0
Accepted
time: 5845ms
memory: 219528kb

input:

2
99998 99997
475641417 309089820 238194190 309089820
946146938 29096115 946146938 219167894
567024976 68478782 567024976 88852704
1059495 463192019 129354477 463192019
860327725 833866164 715798085 833866164
179613997 357544867 370931355 357544867
372906020 283631935 372906020 422863880
293051479 6...

output:

Case #1:
308 27726 4031 80946 8212 25776 64738 48686 85936 14007 243 53486 88413 44676 31309 88022 48716 66170 21451 28784 85618 13503 80692 23068 40463 2871 10868 92870 50925 84841 1186 26086 66376 1155 10849 51378 83175 4344 85182 8002 90710 41683 37677 57063 24396 13271 83697 77890 56956 77270 12...

result:

ok 199998 lines

Test #10:

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

input:

2
10 5
10 10 11 10
10 9 11 9
10 8 11 8
10 7 11 7
10 6 11 6
10 5 11 5
10 4 11 4
10 3 11 3
10 2 11 2
10 1 11 1
0 0 0 3
1 0 0 3
2 0 0 3
3 0 0 3
4 0 0 3
10 8
10 10 11 10
10 9 11 9
10 8 11 8
10 7 11 7
10 6 11 6
10 5 11 5
10 4 11 4
10 3 11 3
10 2 11 2
10 1 11 1
0 0 0 3
1 0 0 3
2 0 0 3
3 0 0 3
4 0 0 3
5 0 ...

output:

Case #1:
1 1
1 2
1 3
1 4
1 5
Case #2:
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8

result:

ok 15 lines

Test #11:

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

input:

2
10 5
10 10 11 10
10 9 11 9
10 8 11 8
10 7 11 7
10 6 11 6
10 5 11 5
10 4 11 4
10 3 11 3
10 2 11 2
10 1 11 1
0 0 0 3
1 0 0 3
2 0 0 3
3 0 0 3
4 0 0 3
9 8
9 9 10 9
9 8 10 8
9 7 10 7
9 6 10 6
9 5 10 5
9 4 10 4
9 3 10 3
9 2 10 2
9 1 10 1
0 0 0 3
1 0 0 3
2 0 0 3
3 0 0 3
4 0 0 3
5 0 0 3
6 0 0 3
7 0 0 3

output:

Case #1:
1 1
1 2
1 3
1 4
1 5
Case #2:
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8

result:

ok 15 lines

Test #12:

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

input:

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

output:

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

result:

ok 38 lines

Test #13:

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

input:

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

output:

Case #1:
1 1
1 2
1 3
1 4
1 5
Case #2:
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8

result:

ok 15 lines

Test #14:

score: 0
Accepted
time: 265ms
memory: 53320kb

input:

2
99999 99997
99999 99999 100000 99999
99999 99998 100000 99998
99999 99997 100000 99997
99999 99996 100000 99996
99999 99995 100000 99995
99999 99994 100000 99994
99999 99993 100000 99993
99999 99992 100000 99992
99999 99991 100000 99991
99999 99990 100000 99990
99999 99989 100000 99989
99999 99988...

output:

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

result:

ok 199994 lines

Test #15:

score: 0
Accepted
time: 279ms
memory: 53380kb

input:

2
99999 100000
100000 100000 100001 100000
100000 99999 100001 99999
100000 99998 100001 99998
100000 99997 100001 99997
100000 99996 100001 99996
100000 99995 100001 99995
100000 99994 100001 99994
100000 99993 100001 99993
100000 99992 100001 99992
100000 99991 100001 99991
100000 99990 100001 999...

output:

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

result:

ok 200001 lines

Test #16:

score: 0
Accepted
time: 289ms
memory: 53336kb

input:

2
100000 99996
100000 100000 100001 100000
100000 99999 100001 99999
100000 99998 100001 99998
100000 99997 100001 99997
100000 99996 100001 99996
100000 99995 100001 99995
100000 99994 100001 99994
100000 99993 100001 99993
100000 99992 100001 99992
100000 99991 100001 99991
100000 99990 100001 999...

output:

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

result:

ok 199997 lines

Test #17:

score: 0
Accepted
time: 1ms
memory: 3568kb

input:

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

output:

Case #1:
1 1
0
0
1 3
0
0
0
1 5
0
Case #2:
1 1
1 6
0
1 4
0
0
0
0
0

result:

ok 20 lines

Test #18:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

2
8 10
0 1 1 1
5 1 6 1
1 1 3 1
6 1 7 1
8 1 10 1
7 1 8 1
4 1 5 1
3 1 4 1
1 2 0 0
3 2 0 1
1 2 0 0
7 2 0 1
6 2 0 1
5 2 0 1
0 2 0 1
3 2 0 0
7 2 0 1
10 2 0 0
6 7
0 1 1 1
1 1 3 1
7 1 8 1
8 1 9 1
9 1 10 1
3 1 7 1
3 2 0 1
3 2 0 1
2 2 0 0
0 2 0 1
0 2 0 1
8 2 0 1
4 2 0 1

output:

Case #1:
1 3
0
0
1 4
1 2
1 7
0
0
0
0
Case #2:
1 2
0
1 6
0
0
1 3
0

result:

ok 19 lines

Test #19:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

2
15 17
0 1 1 1
0 2 2 2
0 3 10 3
2 1 3 1
5 1 6 1
3 1 4 1
8 1 9 1
3 2 7 2
7 1 8 1
2 2 3 2
9 1 10 1
6 1 7 1
4 1 5 1
1 1 2 1
7 2 10 2
5 4 0 0
6 4 0 0
6 4 0 1
2 4 0 0
10 4 0 0
6 4 0 1
9 4 0 0
5 4 0 0
9 4 0 1
8 4 0 0
5 4 0 0
8 4 0 0
5 4 0 0
2 4 0 0
2 4 0 1
7 4 0 1
1 4 0 1
16 15
0 1 1 1
0 2 5 2
0 3 1 3
1 ...

output:

Case #1:
1 3
1 15
1 8
1 5
0
4 6 10 14 2
0
1 7
1 12
0
0
0
0
0
0
1 13
0
Case #2:
1 7
1 10
1 2
1 13
1 3
0
1 12
0
1 1
0
0
0
0
0
1 8

result:

ok 34 lines

Test #20:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

2
17 5
0 1 1 1
0 2 1 2
0 3 1 3
6 1 10 1
4 1 5 1
4 3 6 3
3 1 4 1
6 2 10 2
4 2 6 2
1 3 2 3
1 2 3 2
3 2 4 2
2 3 4 3
1 1 2 1
2 1 3 1
5 1 6 1
6 3 10 3
7 4 0 0
9 4 0 0
3 4 0 1
6 4 0 1
3 4 0 1
19 6
0 1 4 1
0 2 4 2
0 3 1 3
9 3 10 3
5 3 6 3
8 3 9 3
5 2 6 2
7 3 8 3
3 3 4 3
7 2 8 2
2 3 3 3
6 3 7 3
8 2 10 2
6 2...

output:

Case #1:
1 17
0
1 13
1 6
2 11 3
Case #2:
0
1 17
0
1 6
0
1 12

result:

ok 13 lines

Test #21:

score: 0
Accepted
time: 2827ms
memory: 128780kb

input:

2
99995 100000
0 1 5380 1
0 2 10000 2
0 3 520 3
0 4 620 4
0 5 9734 5
0 6 352 6
0 7 8771 7
0 8 51 8
0 9 134 9
0 10 663 10
0 11 3415 11
0 12 10000 12
0 13 9736 13
0 14 2431 14
0 15 10000 15
0 16 10000 16
0 17 1300 17
0 18 585 18
0 19 1144 19
0 20 6661 20
0 21 6844 21
0 22 9339 22
0 23 3791 23
0 24 208...

output:

Case #1:
1 19999
3 56741 96601 93236
1 69245
1 19997
1 19996
1 93767
1 26934
1 83814
1 96859
1 28853
1 51932
1 57732
1 19998
1 19995
1 19994
1 19992
1 90051
1 88899
1 91730
1 19993
1 19991
1 96099
1 60232
1 19990
1 34441
1 44445
1 73627
1 87585
1 21515
1 19988
1 55693
1 50742
1 19987
1 54056
1 40696...

result:

ok 200002 lines

Test #22:

score: 0
Accepted
time: 4452ms
memory: 176172kb

input:

2
99997 100000
0 1 46329 1
0 2 2428 2
0 3 74705 3
0 4 18933 4
0 5 37153 5
0 6 45113 6
0 7 17904 7
0 8 18021 8
0 9 299 9
0 10 19270 10
0 11 93937 11
0 12 100000 12
0 13 34758 13
0 14 100000 14
0 15 59830 15
0 16 35769 16
0 17 29078 17
0 18 14120 18
0 19 11567 19
0 20 100000 20
0 21 6329 21
0 22 3251 ...

output:

Case #1:
1 19999
1 19998
1 43279
1 19997
1 30263
1 19996
1 43905
1 19995
1 19994
1 96245
1 19993
1 91031
1 31066
1 88674
1 36936
1 23972
1 73573
1 21016
1 19990
1 21477
1 63553
1 19989
1 63098
1 19988
1 63175
1 87430
1 65274
1 35014
1 30108
1 56911
1 19986
1 55007
1 19985
1 19992
1 19984
1 19983
1 2...

result:

ok 199999 lines

Test #23:

score: 0
Accepted
time: 4639ms
memory: 198472kb

input:

2
99998 99996
0 1 310429006 1
0 2 106070680 2
0 3 1000000000 3
0 4 264075802 4
0 5 111561447 5
0 6 64296333 6
0 7 719928815 7
0 8 256056452 8
0 9 1000000000 9
0 10 3909965 10
0 11 1000000000 11
0 12 55635895 12
0 13 10385847 13
0 14 2223985 14
0 15 439173032 15
0 16 87220560 16
0 17 126320285 17
0 1...

output:

Case #1:
1 37870
1 27503
1 65969
1 50544
1 39989
1 19997
1 19996
1 19995
1 91894
1 75748
1 19994
1 24449
1 65200
1 29401
1 41452
1 43105
1 19992
1 47404
1 19991
1 19999
1 87013
1 96356
1 19989
1 19990
1 21818
1 24338
1 84814
1 32133
1 61206
1 19986
1 19985
1 83809
1 31040
1 19984
1 34544
1 19987
1 5...

result:

ok 199997 lines

Extra Test:

score: 0
Extra Test Passed