QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#236391#7610. Bus Linesucup-team138TL 4871ms671648kbC++146.3kb2023-11-03 22:07:462023-11-03 22:07:46

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 55060kb

input:

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

output:

6 9 9 10 7 7 

result:

ok single line: '6 9 9 10 7 7 '

Test #2:

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

input:

2
1 2
1
1 2

output:

1 1 

result:

ok single line: '1 1 '

Test #3:

score: 0
Accepted
time: 233ms
memory: 70640kb

input:

16384
9137 490
3442 7239
1621 6904
13769 10250
14672 12572
14906 9437
6163 12339
15244 12016
3022 8670
3211 9106
11966 14817
15798 15876
6423 7394
894 7695
13877 1983
16342 15158
13574 15932
15125 10722
6989 15683
10335 8801
12301 4246
6166 3893
9347 12073
7897 12195
6510 3101
4526 15385
7017 7001
4...

output:

34355 34048 34070 34152 33992 33977 34077 42219 34103 33976 34065 34170 34072 34061 34069 34177 34068 34129 33872 50478 34059 33921 34153 34049 34034 33820 34132 34116 34361 33728 50043 34138 33855 33873 34309 34319 34068 50753 34135 34256 34159 34034 34056 34361 34171 34316 34058 34125 34019 34182 ...

result:

ok single line: '34355 34048 34070 34152 33992 ... 34333 33814 33294 34266 34337 '

Test #4:

score: 0
Accepted
time: 1344ms
memory: 119520kb

input:

65536
44501 44259
59772 51161
51582 2027
2699 8610
5021 57211
60597 10270
29222 11423
38503 3833
52021 47503
47160 15296
61201 13465
20807 17239
7705 20234
32708 25663
7800 42265
29410 44963
32173 38920
49438 61282
25922 4342
40171 9819
12256 3995
41600 39383
57051 60932
44275 8351
8356 8295
3557 64...

output:

140178 136111 137025 136494 136304 137262 136598 135563 136530 135406 199677 137437 140282 136109 140127 136827 137235 136000 140738 139961 140081 142677 136544 201610 136181 136393 137013 137354 136855 135440 127050 136828 136781 137439 136518 185910 137170 136902 140686 136703 136847 137483 136337...

result:

ok single line: '140178 136111 137025 136494 13...63 136343 136858 137469 137325 '

Test #5:

score: 0
Accepted
time: 4515ms
memory: 238880kb

input:

131071
28270 44685
69228 113487
10873 80967
30958 109340
53006 103488
49569 111875
65021 32861
83043 36671
73613 119374
22104 91373
31527 27737
19718 27803
90762 87148
4096 41649
79425 111516
111950 123500
94580 61416
30879 18640
71251 76344
61698 28557
104875 59268
130832 61334
110927 109064
114115...

output:

273557 262588 264936 265663 265875 266353 265834 265712 376149 272370 267699 267626 267023 265515 266009 265333 278296 265843 265760 268149 267395 265340 271825 358266 268835 264845 266112 265586 265886 266374 265323 265391 266080 265499 278600 267120 265190 266164 266010 265240 265690 265370 264312...

result:

ok single line: '273557 262588 264936 265663 26...42 266079 265822 265939 266211 '

Test #6:

score: 0
Accepted
time: 2005ms
memory: 522700kb

input:

131071
4458 33223
28971 26710
73930 35887
19953 56582
19448 128895
117093 55994
68752 16511
37373 128666
1236 73891
64724 74049
67901 130974
130547 112357
99689 77958
76785 17021
37348 91813
67628 67488
96598 83555
17348 74226
98935 43076
75325 83600
59427 80746
74874 122816
71615 76503
112584 12953...

output:

131070 131070 131070 131070 131070 131070 131071 131071 131071 131071 131070 131071 131070 131070 131071 131071 131070 131071 131071 131070 131070 131070 131070 131070 131071 131070 131070 131070 131070 131070 131070 131071 131070 131071 131070 131070 131070 131070 131070 131071 131070 131070 131071...

result:

ok single line: '131070 131070 131070 131070 13...70 131071 131070 131070 131071 '

Test #7:

score: 0
Accepted
time: 4577ms
memory: 227752kb

input:

131072
20415 30901
24973 116658
50309 77228
14138 108175
122283 105254
80524 41943
16756 109108
113505 71325
9649 106367
125747 68730
27704 18831
12993 123364
57489 129424
96113 82877
44188 4472
5704 86388
73653 70774
41742 33080
6701 59595
80297 22453
59925 75977
88478 91057
97666 26155
30080 55382...

output:

267346 265658 267019 267148 266495 270630 265327 266124 266100 265926 265909 266766 265785 266284 265064 266584 266146 266937 271485 265805 265480 266087 267189 264771 266288 266965 270451 265977 265706 265268 265845 267259 265723 266249 266047 266159 270563 266086 265976 265845 265431 265535 265930...

result:

ok single line: '267346 265658 267019 267148 26...80 270694 266015 266101 265704 '

Test #8:

score: 0
Accepted
time: 2022ms
memory: 505928kb

input:

131072
48550 41416
47329 96006
106074 122239
948 75631
112525 117270
3358 7210
30446 101867
16965 11336
78371 58088
21081 102637
76025 92177
102359 2073
11618 50130
79150 120277
30847 51845
72881 58212
125170 71210
1909 8660
120236 81594
127702 49237
32584 53272
5049 20955
31844 125464
119524 100808...

output:

131071 131072 131078 131071 131071 131072 131072 131072 131074 131071 131071 131071 131072 131071 131071 131072 131072 131072 131071 131115 131078 131072 131074 131071 131072 131074 131071 131071 131072 131072 131074 131074 131072 131072 131074 131072 131078 131072 131077 131074 131071 131072 131072...

result:

ok single line: '131071 131072 131078 131071 13...71 131074 131072 131072 131072 '

Test #9:

score: 0
Accepted
time: 4399ms
memory: 241012kb

input:

131073
113890 124822
124669 105393
128510 64051
106729 33462
46677 33217
73570 96913
47532 130531
8593 45487
31793 58221
49510 82943
60351 62272
42636 37378
105049 94689
124230 45945
13194 123517
107928 62129
7572 15657
84304 122943
19818 59980
104221 18821
66457 91449
5072 101241
61822 5975
74471 6...

output:

266326 266281 266163 265817 265563 266929 265938 266796 265751 265513 266249 269598 266832 267310 265225 266439 266351 265499 397338 269917 266647 266193 266663 266655 269976 266497 326968 266761 266261 266672 265613 266103 265821 265496 265891 266411 265820 266598 266583 266154 265794 265587 266472...

result:

ok single line: '266326 266281 266163 265817 26...69 266180 266343 268563 266527 '

Test #10:

score: 0
Accepted
time: 2156ms
memory: 462628kb

input:

131073
30694 94981
78010 61921
83010 76565
7176 94673
24081 63906
107002 35122
72499 90887
98339 109807
48362 125168
5335 63101
127350 85675
13421 77562
2375 93853
10090 23323
91852 109502
21899 90367
56580 125803
108402 88380
30465 25789
73326 29902
60781 28952
113429 111420
15039 5166
48046 85049
...

output:

131072 131072 131073 131072 131072 131072 131072 131072 131072 131072 131072 131205 131072 131072 131072 131083 131073 131072 131083 131073 131072 131072 131072 131072 131073 131073 131072 131072 131072 131072 131072 131072 131072 131072 131072 131083 131073 131073 131072 131194 131205 131072 131072...

result:

ok single line: '131072 131072 131073 131072 13...72 131072 131072 131072 131072 '

Test #11:

score: 0
Accepted
time: 2550ms
memory: 516812kb

input:

200000
303 187602
17443 90857
141584 9689
98281 37564
34044 95754
47052 855
176062 121958
162738 96296
89316 164507
150496 42874
12673 1114
24877 131213
196802 28543
78558 84878
102156 146853
143846 158517
167159 69770
16743 9610
169056 115672
127506 149401
4110 24877
150803 72957
71484 24773
50738 ...

output:

200000 200000 200001 200009 200000 200000 200000 200004 200000 200001 200009 200040 200000 200000 200371 200001 200001 200000 200005 200000 200103 200000 200005 200001 200002 200000 200004 200000 200004 200002 200001 200004 200000 200004 200103 200000 200001 200001 200009 200004 200000 200000 200009...

result:

ok single line: '200000 200000 200001 200009 20...00 200000 200000 200001 200001 '

Test #12:

score: 0
Accepted
time: 2733ms
memory: 671648kb

input:

200000
91261 108952
134236 7809
30750 140934
69514 100626
174539 64746
143756 139270
75999 163614
73309 112948
110641 128653
77295 196144
112549 15212
29529 58568
34742 48981
160465 37279
60772 47631
116260 164168
140007 138837
152400 41600
46137 103771
122809 991
98335 53547
71446 60454
182926 9505...

output:

259717 224832 623118 233065 221904 225116 248347 347328 229609 227413 369557 318840 231176 228808 255754 223173 224794 339975 239690 230310 252630 225403 411260 227236 240962 241886 231002 333731 242413 226478 294844 238042 224724 260233 244253 330794 247474 231750 283982 269581 221874 223906 258662...

result:

ok single line: '259717 224832 623118 233065 22...21 228869 224599 227932 221883 '

Test #13:

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

input:

3
3 2
1 3
1
1 2

output:

2 2 2 

result:

ok single line: '2 2 2 '

Test #14:

score: 0
Accepted
time: 3677ms
memory: 441584kb

input:

200000
139347 147721
117297 105382
77192 197023
48135 123968
192172 102714
134778 129103
89903 62952
133541 38908
157094 5072
98697 154745
126329 161358
10578 175752
174214 105555
128475 68598
37906 187226
161543 11243
153891 97890
8751 74708
1967 76185
67263 189209
68782 199622
163887 141633
176004...

output:

322099 242574 317560 692202 290760 228294 365767 338369 353452 316822 250525 392353 334147 230213 228522 235083 402948 230055 390730 404058 356419 260604 408966 344671 228306 285866 230909 242013 251050 312234 247399 300014 275307 396635 301629 245071 324672 317767 338521 318599 251342 394339 233005...

result:

ok single line: '322099 242574 317560 692202 29...72 316661 233236 238848 229144 '

Test #15:

score: 0
Accepted
time: 3699ms
memory: 472724kb

input:

200000
48091 145114
125125 28630
12239 122518
46999 28599
9536 79090
173383 59215
130797 80267
19356 192091
70170 63308
51543 84599
75128 23622
67565 61168
59080 1306
169051 40849
189030 31373
186212 42004
87480 32135
81468 163743
112945 69079
83894 23714
71122 15016
66755 85285
115054 110310
3811 4...

output:

352484 361697 353433 343102 240568 351386 298596 364831 245058 343138 260208 258681 345310 370366 432737 233034 361503 405572 231637 345073 347968 358736 232149 353892 398610 251240 431731 345221 343820 346239 347060 263522 231954 393526 360199 379830 373877 236327 353553 603138 426721 241772 231332...

result:

ok single line: '352484 361697 353433 343102 24...94 353707 382734 557096 397978 '

Test #16:

score: 0
Accepted
time: 3922ms
memory: 398460kb

input:

200000
100856 98512
7263 55794
118589 8600
181408 78844
136926 96808
184915 65090
34153 123222
81629 114888
41173 81343
115395 158775
74974 23534
3836 68657
105617 97663
76598 41608
28787 13900
100912 96168
68712 136985
80113 56372
112283 126282
119777 137629
165008 120438
53426 26030
78094 83600
18...

output:

385605 380500 397966 236324 577262 360773 233242 371405 362611 369437 365600 386222 381693 250148 585672 376752 366566 253349 377273 388253 269521 263111 427010 369947 392348 389317 423904 233334 252314 359670 387478 359580 233140 434587 321068 233635 234253 365444 235007 599141 373618 362626 360872...

result:

ok single line: '385605 380500 397966 236324 57...45 241541 407294 372787 439030 '

Test #17:

score: 0
Accepted
time: 4386ms
memory: 372312kb

input:

200000
180714 64749
50294 63588
118425 45210
19449 119242
106397 111631
165556 58767
54399 99326
53093 31192
63207 75350
36668 124604
80509 124402
69687 129300
190278 28893
50196 134511
46249 169905
58139 53110
87694 22713
75518 99566
179781 17413
110365 34464
27454 193678
130171 47991
174341 58040
...

output:

409591 396787 395821 239526 599035 470672 428144 397055 392027 394551 439143 394596 388894 404545 405346 348418 392047 593706 389817 326075 394143 396508 393233 425007 399946 397646 399058 595850 413576 389700 412903 417007 392550 401326 462627 392588 275297 400751 395385 395593 398254 244287 415091...

result:

ok single line: '409591 396787 395821 239526 59...05 410665 400756 392347 468683 '

Test #18:

score: 0
Accepted
time: 4871ms
memory: 426116kb

input:

200000
30933 92193
77862 62042
158213 175855
16780 145844
1108 114460
160478 9352
82719 112145
142088 62191
15793 183238
129644 169759
70407 173026
113244 57481
56239 24998
45541 79142
119610 110586
99594 22588
198974 169804
99392 125472
63750 161647
119893 161584
25389 132271
48396 138568
63641 385...

output:

603675 406633 422392 407572 409097 406433 406205 407058 420803 408723 464911 425536 410465 481876 407605 576569 607865 431005 412229 419713 410499 412896 408749 606713 403730 427776 408406 407828 606627 417814 407449 407308 404474 470975 410304 412734 413266 406163 408984 403576 406249 405420 406787...

result:

ok single line: '603675 406633 422392 407572 40...37 412018 406965 408388 609396 '

Test #19:

score: -100
Time Limit Exceeded

input:

200000
53058 81131
171867 48542
51107 57582
48378 14960
8723 5010
161623 59486
63739 114343
146033 97144
38395 143404
106830 120862
166654 142711
17747 75675
115326 57950
141271 125647
172839 194710
87377 142587
179489 111106
83353 29003
25273 100804
126366 129214
377 22864
136214 154742
26790 69245...

output:


result: