QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#278700#5159. Justice Serveducup-team425#WA 116ms31544kbC++142.2kb2023-12-07 19:25:092023-12-07 19:25:10

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
2 8
1 7
4 5
5 2

output:

0 0 1 2 

result:

ok single line: '0 0 1 2 '

Test #2:

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

input:

5
2 4
3 3
2 2
4 2
4 1

output:

0 1 1 2 3 

result:

ok single line: '0 1 1 2 3 '

Test #3:

score: 0
Accepted
time: 116ms
memory: 31512kb

input:

200000
75760147 173015388
62879760 211229046
6728658 106668560
29476341 129401393
30531505 130450085
39792769 139780734
59486082 221617335
12447225 112582555
94207716 117434450
68962063 193352291
13519090 113644734
60611935 218232526
77901558 166662816
40316254 140281744
39094390 138994435
49921965 ...

output:

51062 25770 5 10 10 12 19010 7 88301 37698 7 21153 55418 12 11 11 10 24874 11 7 8 45763 24219 12 9 55419 8 4 12678 12 65162 11 1 33102 12 20822 81107 8 1958 98787 89734 10 95816 44261 89321 10 7 12 4 8126 16028 8 8 90492 70192 36706 8 10 46831 39832 38636 9 53669 7 12 4 12 12 10 83777 15930 8 4 8 46...

result:

ok single line: '51062 25770 5 10 10 12 19010 7...9 9 12 84254 91909 88054 9 7 7 '

Test #4:

score: 0
Accepted
time: 101ms
memory: 31544kb

input:

200000
22478286 122609694
2666848 102602877
81344953 155917988
11205360 111352349
81248094 156190492
43638920 143549443
68394626 194903725
17861330 117826788
36708079 136815364
4734745 104627925
90398356 128943645
88701937 133897870
44946698 144761374
75120655 174473016
82684791 151861295
65374243 2...

output:

31 12 62136 28 61965 42 36423 28 43 15 79857 76627 42 49806 64760 30370 44 27 36 43 35942 23 43 86537 44 35 56638 82237 14 42 78728 44 88149 83524 27 14 90213 34740 10 12896 24116 31214 95746 31 80678 65090 39591 69575 15 19350 42 41 76197 11144 27 30708 26 58272 85102 8394 42 72511 31 60311 892 600...

result:

ok single line: '31 12 62136 28 61965 42 36423 ... 94480 42 28 94052 42630 32706 '

Test #5:

score: 0
Accepted
time: 108ms
memory: 30980kb

input:

200000
3485676 104322522
12830401 115693032
98166050 105206658
50264341 240551623
71635236 180559506
95728650 112122220
23688070 128687885
32526891 139494567
96454278 110061574
98003056 105657846
89652765 129442912
60691912 211220216
79007635 159715353
48164848 246458583
23777776 128837054
80295466 ...

output:

0 0 106298 10083 52636 101374 3 3 102852 105976 89048 30813 67512 5860 3 70053 75079 109116 3 3 3 12746 3 0 3 92826 3 0 0 109335 3 80646 62565 31151 5822 41848 3 29476 0 61200 67480 3 19030 3 0 0 3 0 101282 3 83480 32423 24496 0 9267 90946 47903 3 0 43431 0 2 3 3 0 69688 66155 21401 93179 92527 2967...

result:

ok single line: '0 0 106298 10083 52636 101374 ...2 33293 104473 23128 58257 1 0 '

Test #6:

score: 0
Accepted
time: 107ms
memory: 31232kb

input:

200000
2756775 105169200
62793487 194297574
27888859 152074746
51428236 223127722
36803305 260374362
6127328 111403994
89868556 125636149
4255333 108066624
38444250 256256014
72572904 169620169
86479380 134193427
52543632 220364713
86863477 133213952
64982506 188781981
61978182 196375720
22437971 14...

output:

0 55710 1 32910 3614 0 109807 0 6829 75093 103116 35114 103903 59992 54100 1 16381 92663 111425 2 123134 48157 78425 57257 32682 2 124941 85426 2 2 117043 2 41299 1 12703 1 126791 1 117820 2 73067 109430 0 53341 74893 63219 107840 13687 46471 19083 2 1 13113 107128 4338 100834 6036 0 1 2 75368 0 152...

result:

ok single line: '0 55710 1 32910 3614 0 109807 ...3 32123 37590 14126 107753 1 1 '

Test #7:

score: 0
Accepted
time: 106ms
memory: 29984kb

input:

200000
38721520 120614174
74264049 199951267
8490351 104615052
4412367 102379828
6503466 103469400
57360315 130697733
9525340 105152734
61995492 133160702
8263377 104490093
48862476 126144960
34296652 118335310
27937237 115021595
66447810 229649744
87901810 147007961
19471440 110653662
80164404 1769...

output:

3 18079 1 1 1 3 1 3 1 3 2 2 2587 45543 0 30099 3 27110 2 7906 3 1 27614 2 37320 3 1 0 0 0 3 0 2 0 3 523 3 18677 22098 3 3 0 3 1 21172 1 0 2 0 3 1 3 0 0 7842 3 44246 51176 48207 62295 6414 0 60285 1 3 32700 24531 0 15930 1 63548 3 0 53004 1 42806 11838 3706 59843 3 2 3 0 2 0 3 3 3 3 1 0 3 3 3 2 2 3 0...

result:

ok single line: '3 18079 1 1 1 3 1 3 1 3 2 2 25...24 1 0 2 37127 3 1 19432 43349 '

Test #8:

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

input:

3
1 2
3 2
2 2

output:

0 0 0 

result:

ok single line: '0 0 0 '

Test #9:

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

input:

1
1 1

output:

0 

result:

ok single line: '0 '

Test #10:

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

input:

4
1 3
1 2
2 2
2 1

output:

0 1 1 2 

result:

ok single line: '0 1 1 2 '

Test #11:

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

input:

5
1 4
2 3
1 2
2 2
2 1

output:

0 1 1 2 3 

result:

ok single line: '0 1 1 2 3 '

Test #12:

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

input:

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

output:

0 0 1 0 1 2 

result:

ok single line: '0 0 1 0 1 2 '

Test #13:

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

input:

20
34227248 933434761
120240046 876270748
44578530 656030729
44490919 642226531
34227248 587975195
180397711 485137686
251054019 452891893
251054019 438080574
395968192 409864677
144053797 302891387
756155971 235957485
541312681 186580145
16852198 184550815
31513569 169889444
876043558 120467236
373...

output:

0 0 1 1 1 2 1 2 1 2 1 2 0 1 1 3 2 3 2 3 

result:

ok single line: '0 0 1 1 1 2 1 2 1 2 1 2 0 1 1 3 2 3 2 3 '

Test #14:

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

input:

1000
29696082 959543444
49862782 939376744
68547983 920691543
49862782 918570775
68547983 899885574
51937731 891245701
77597657 890835900
49862782 885511865
77597657 871037426
68547983 863562380
127511967 861727559
129731223 859508303
140755051 855649379
68547983 840642376
51937731 839562141
1297312...

output:

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

result:

ok single line: '0 1 2 2 3 3 4 3 5 4 3 4 0 5 4 ... 40 41 51 50 55 38 51 50 50 51 '

Test #15:

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

input:

20
6 55
6 51
12 49
35 42
12 38
36 34
44 33
11 33
6 30
52 29
57 29
12 28
14 24
12 23
8 15
60 10
61 9
16 7
77 5
81 3

output:

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

result:

ok single line: '0 1 1 0 2 1 1 2 2 0 0 3 4 4 3 2 3 5 1 1 '

Test #16:

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

input:

20
2 24
2 17
1 16
5 13
8 11
1 9
10 9
19 9
14 9
20 8
14 6
11 6
13 4
20 4
20 3
16 3
14 2
16 2
25 1
1 1

output:

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

result:

ok single line: '0 1 0 2 2 1 3 0 1 1 2 4 5 2 3 4 6 5 2 2 '

Test #17:

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

input:

300
63706201 914625484
31174101 900714693
56508338 889770342
78653828 856657750
57959632 841056018
98423527 838800090
4386689 832347844
93839098 829598240
150402200 823594556
145168366 806755375
55958074 800782510
39250044 781936612
219893149 767803781
231268915 765096785
173157095 761921712
2143759...

output:

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

result:

ok single line: '0 0 0 1 1 1 0 2 1 1 1 1 0 0 2 ...5 8 12 10 15 20 20 15 16 17 15 '

Test #18:

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

input:

200
8969419 938584001
84325103 904452520
19602351 875433512
117384970 861268770
96978177 856364137
74876365 851370909
122214196 849116958
110318325 843309080
55307848 838193161
53920992 822896653
167965764 801783975
151365158 792202551
191429947 778164706
122112852 775574412
17014434 767282398
50193...

output:

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

result:

ok single line: '0 0 1 1 1 1 2 1 2 2 3 3 4 2 1 ...6 18 19 3 13 16 17 13 16 12 18 '

Test #19:

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

input:

150
137126984 852215071
52978944 840843612
1765277 823044629
137465186 815842434
170033705 791361830
66634804 761977985
141528862 757130587
185003206 744881940
204112033 725240953
24103754 718026417
97449622 711796093
103258737 706642541
104469696 663047387
319764579 657090166
303129574 656263495
22...

output:

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

result:

ok single line: '0 0 0 1 1 1 2 2 3 1 2 2 3 1 2 ...1 12 11 11 10 3 9 9 10 12 12 7 '

Test #20:

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

input:

100
19967512 929200601
64089464 904598739
21742863 904490279
35850661 840108586
180326690 817983284
129965125 778956578
91164426 753511166
109432705 750976875
92896448 734929824
186410022 718777089
35327230 703399393
151204377 691153081
343992719 646574466
43025850 633606190
11000117 631531522
46910...

output:

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

result:

ok single line: '0 0 1 2 0 2 3 3 4 3 2 4 1 3 0 ... 8 12 12 11 12 9 8 5 9 6 12 11 '

Test #21:

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

input:

100
122711106 843158965
80469267 803459693
100964860 791903186
187751936 789688616
167066052 754558228
202126583 742891961
36823923 740749173
229368022 733818151
162043554 726181545
79906672 723139379
216268325 711897888
170846658 672270417
19967026 670060485
186148228 651581753
315104197 649187831
...

output:

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

result:

ok single line: '0 0 0 0 1 1 0 1 1 0 2 2 0 3 1 ...6 7 1 8 5 10 11 6 9 1 9 5 9 10 '

Test #22:

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

input:

100
75930942 823616293
110530577 820059434
144806905 797095806
19602152 788761539
136035026 769393357
95014944 734924557
139700118 732123002
4034488 718101876
72404162 716551249
291682975 694592187
102591297 678052798
110644712 673047041
24654705 663589897
97056707 659037475
244084557 648014665
1857...

output:

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

result:

ok single line: '0 0 0 0 1 1 2 0 1 0 2 2 1 2 2 ...4 1 7 4 0 6 7 5 3 7 5 6 10 9 4 '

Test #23:

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

input:

50
153933260 831625801
8069775 823487981
93649400 795554252
203780836 780248204
107150895 769175906
187842236 767765690
184146593 726174043
300418611 680931382
283688659 553293234
295354140 541324493
1642537 522305915
112062672 489884220
470683744 473322121
141006512 453155743
129446082 438069205
52...

output:

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

result:

ok single line: '0 0 0 1 1 1 1 2 2 3 0 2 3 3 3 ... 6 8 4 5 6 6 4 6 2 7 7 7 9 5 9 '

Test #24:

score: 0
Accepted
time: 31ms
memory: 12328kb

input:

100000
1000000000 1000000000
1000000000 999999999
1000000000 999999998
1000000000 999999997
1000000000 999999996
1000000000 999999995
1000000000 999999994
1000000000 999999993
1000000000 999999992
1000000000 999999991
1000000000 999999990
1000000000 999999989
1000000000 999999988
1000000000 99999998...

output:

0 1 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...

result:

ok single line: '0 1 2 3 4 5 6 7 8 9 10 11 12 1... 99995 99996 99997 99998 99999 '

Test #25:

score: 0
Accepted
time: 27ms
memory: 13888kb

input:

100000
999900001 1000000000
999900002 999999999
999900003 999999998
999900004 999999997
999900005 999999996
999900006 999999995
999900007 999999994
999900008 999999993
999900009 999999992
999900010 999999991
999900011 999999990
999900012 999999989
999900013 999999988
999900014 999999987
999900015 99...

output:

0 1 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...

result:

ok single line: '0 1 2 3 4 5 6 7 8 9 10 11 12 1... 99995 99996 99997 99998 99999 '

Test #26:

score: -100
Wrong Answer
time: 36ms
memory: 12280kb

input:

100000
1000000000 999974295
1000000000 999906314
1000000000 999900685
1000000000 999922408
1000000000 999919991
1000000000 999914637
1000000000 999973099
1000000000 999930456
1000000000 999989532
1000000000 999911550
1000000000 999999197
1000000000 999989024
1000000000 999945488
1000000000 999989986...

output:

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

result:

wrong answer 1st lines differ - expected: '25705 93686 99315 77592 80009 ...67 74948 27920 31702 7433 93763', found: '0 1 2 1 2 3 1 2 0 4 0 1 2 1 5 ...36 314 222 538 329 350 164 594 '