QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#121299#6117. Determine The Fluctuation BonusZhangYiDeWA 154ms19200kbC++201.6kb2023-07-07 21:20:372023-07-07 21:20:37

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 7536kb

input:

3 7
2 -1
1 4
2 5
3 6
1 -7
3 -6
2 9

output:

2
6
5

result:

ok 3 number(s): "2 6 5"

Test #2:

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

input:

9 5
2 10
2 -20
2 20
2 -20
2 20

output:

5
32
5
5
5
5
5
5
5

result:

ok 9 numbers

Test #3:

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

input:

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

output:

0
0
0
0
0

result:

ok 5 number(s): "0 0 0 0 0"

Test #4:

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

input:

1 1
1 0

output:

0

result:

ok 1 number(s): "0"

Test #5:

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

input:

1 1
1 -1000000000

output:

0

result:

ok 1 number(s): "0"

Test #6:

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

input:

1 1
1 1000000000

output:

0

result:

ok 1 number(s): "0"

Test #7:

score: 0
Accepted
time: 97ms
memory: 17452kb

input:

34 99924
5 384094577
32 -796292690
21 -811649302
16 962640530
11 -949299967
26 946724925
32 -871556791
13 -597225272
5 -462265209
17 -360565332
30 973334595
26 65508285
25 -313976558
11 -305308663
4 44272276
3 505903660
19 -828537724
7 -809263187
5 -127755414
19 168244448
13 451711380
17 706137232
2...

output:

1710
2465
2377
1036
2028
1650
2222
2291
2113
579
1536
1820
2479
1610
2210
1395
2213
2289
804
1996
2692
1363
1395
767
1668
1740
1103
1954
1101
2137
1869
1735
2466
2356

result:

ok 34 numbers

Test #8:

score: 0
Accepted
time: 125ms
memory: 17604kb

input:

443 99904
355 776573502
441 -293834208
375 -837011997
40 2774488
397 -249123167
69 -668289981
43 126338528
157 72371393
305 -608040225
253 -492951696
117 -13750067
77 -926024146
115 -887142637
146 585581525
118 -262829358
48 683226063
235 -844096239
69 513944511
223 -498788495
241 -911077572
113 -93...

output:

7435
7270
6432
7641
2790
7721
3771
6005
7048
6948
7038
6544
7023
7418
7049
5335
5809
5634
5960
4388
5976
7737
6746
3312
7530
1984
6800
7404
6116
7491
4906
5022
7280
6565
7198
6032
7810
2660
1697
7036
4367
8059
4639
8228
5447
6877
6983
6887
2793
7200
7466
6033
5821
7692
7465
7800
7458
5839
6406
7130
...

result:

ok 443 numbers

Test #9:

score: 0
Accepted
time: 129ms
memory: 17424kb

input:

240 99983
104 -95278518
231 572854945
93 -368197265
174 -738422454
193 521431685
90 655012878
65 301059792
147 -403962108
21 -858177820
87 223139155
181 -959038878
68 -14423910
30 -699054356
120 435440768
82 983702786
63 211402654
217 92961114
162 -358114816
23 779543403
160 -455406864
201 -48723282...

output:

4457
4667
4950
6031
3883
4270
6068
6035
4719
2709
1574
4796
5219
2339
4844
5880
2683
5995
2596
5281
5413
5607
4429
5419
5911
5350
5792
5301
4988
3019
5353
756
5064
4800
3912
4133
4306
2924
5941
5976
4870
4644
4357
4481
3119
4770
5603
5480
5434
4580
2580
5168
4687
5494
4377
4224
4821
6389
5734
6284
5...

result:

ok 240 numbers

Test #10:

score: 0
Accepted
time: 145ms
memory: 19040kb

input:

100000 100000
17709 872080604
29908 948861030
31960 -909331019
4551 573019995
74654 -688106402
17784 -165486948
24765 -503004971
93138 -47580542
98455 -708200927
35979 -874695335
86738 -326977214
48335 912206161
13410 -654819759
52214 -917196936
97024 -728452010
40411 3245912
10276 885241981
59066 6...

output:

61740
40683
105833
105202
37101
111175
40683
260900
40683
106677
98202
29090
40683
100241
40683
111627
40683
179768
40683
40683
81997
40683
36117
106245
40683
236625
41443
40683
106611
121683
40683
57299
40683
93545
40683
44340
118578
40683
40683
27289
103670
40683
40683
40683
40683
42925
40683
4068...

result:

ok 100000 numbers

Test #11:

score: 0
Accepted
time: 142ms
memory: 19200kb

input:

100000 100000
6073 685908938
16764 704624104
95954 273780301
19560 -659974636
69166 -6946088
17735 -461272926
72900 567789228
2748 -310095707
34051 643569128
49582 -223620070
28175 -390945828
55829 -361864174
41031 532714060
82113 403993012
25401 -160547950
11547 804155155
41120 -116232798
4795 7510...

output:

43092
40446
40446
47931
127194
40446
45880
9151
41302
37379
104574
124235
21603
105718
40446
40446
40446
92055
64633
97507
130625
48950
98322
44598
97514
40446
40446
40446
40446
104654
103020
40446
30511
176745
40446
62017
12307
40446
40446
40446
40446
40446
40446
62977
40446
40446
54007
40446
49588...

result:

ok 100000 numbers

Test #12:

score: 0
Accepted
time: 141ms
memory: 19044kb

input:

100000 100000
97454 -628479669
43620 -691823768
98133 -126622464
63692 -911353704
87969 830546574
74799 361384781
95616 434222246
44630 -693601283
57761 477744960
36486 -787190361
11808 -356573877
44931 407975831
84420 890951
62598 -82219099
58361 590326125
45300 -169604191
30262 590830618
61953 585...

output:

104465
100975
106920
102530
40354
40354
40354
49984
97678
156033
101676
40354
107006
104424
40354
38437
60900
56269
40354
185806
40354
42315
106638
40354
41505
13350
25398
89905
202526
96626
40894
40354
86958
40354
203569
120096
25247
40354
40354
50785
109313
40354
46556
45287
40354
40354
35229
4372...

result:

ok 100000 numbers

Test #13:

score: 0
Accepted
time: 135ms
memory: 18964kb

input:

100000 100000
27477 676816623
61731 -99391452
43666 -981400905
82438 -970831219
54455 -950333903
11160 -728862086
68822 807890073
96505 -601154870
12638 790703265
14467 733765940
90712 96636590
44077 -343657008
97736 154593712
73661 -637118422
67953 68826315
79183 418700723
56485 -331752044
50151 72...

output:

40256
61684
82805
30589
108123
101175
40256
59474
40256
40256
40256
92649
40256
40256
40256
40256
187241
40256
40256
38905
51604
84720
40256
40797
27791
45350
114858
112966
42575
40256
40256
104709
37989
165064
40256
40256
33638
60662
104493
195153
33179
103289
111411
40256
40256
116470
40256
40256
...

result:

ok 100000 numbers

Test #14:

score: 0
Accepted
time: 139ms
memory: 19040kb

input:

100000 100000
75703 541330936
88274 91946190
56588 32766958
95138 -7915439
92675 -709848272
65937 -545936022
53469 305332762
43622 888353693
73592 -480465072
24390 -797198315
6128 -898212765
80750 -916911239
97152 -244544744
60372 -213797099
48804 720335891
28019 585130247
99635 884179031
65813 5030...

output:

98435
29089
40285
40285
137599
103400
108928
40285
40285
40285
95701
103489
134377
44546
57762
45583
47168
40285
36727
116850
41416
67042
40704
201454
40285
110336
40285
145550
40608
110575
40285
40285
99415
101023
46222
115518
27881
40285
96437
48332
40285
132932
40285
102571
40285
43560
40285
4028...

result:

ok 100000 numbers

Test #15:

score: 0
Accepted
time: 126ms
memory: 19196kb

input:

99925 99931
44574 -930114987
63860 -829383710
42760 -738038607
77622 -555546593
73095 -452821535
19483 -924945
73679 859098486
40562 970516634
6918 299131558
4508 683291169
37516 -597986810
95574 -806768619
924 -963661000
47618 665067787
8412 -562845077
34188 -164693371
58674 -693627556
66604 -10101...

output:

138637
104464
40212
40212
71097
40212
40212
104374
40212
40212
40212
40212
188581
183556
46722
40212
96082
108578
130967
40212
40212
100812
52746
36674
40686
40212
32754
40689
40212
40212
40212
98649
105673
40212
32180
197252
104774
124535
40212
95448
129138
40212
40212
38507
26604
108618
111446
101...

result:

ok 99925 numbers

Test #16:

score: 0
Accepted
time: 154ms
memory: 19032kb

input:

99987 99985
4703 -355089109
58679 -152394746
10698 -361633363
49456 322829368
50239 621663148
15160 609948723
94251 -158786940
1539 743498121
48312 -52943535
36148 631258824
24656 -993048379
92130 405573677
53346 -422420456
44890 511431855
60792 607203514
50652 -179513074
41238 205314888
16215 94992...

output:

40252
38925
40252
45751
107325
103265
40163
112195
125108
113175
40252
40252
38020
42437
40252
114142
111856
175904
119800
25799
40252
132111
122850
128502
116250
40252
130968
93179
40252
43273
43475
100758
40252
52469
81633
40252
111563
90736
107798
96098
40252
40554
110711
46273
101846
166156
1062...

result:

ok 99987 numbers

Test #17:

score: 0
Accepted
time: 139ms
memory: 19192kb

input:

99901 99967
92790 982800752
54919 -781431144
82593 466237047
86824 -612261029
58433 110782408
40688 438081589
20313 -142105395
38736 -514306527
31712 471261698
89783 -254718671
8382 -196339579
30095 -607222390
11253 563987079
72082 471370938
40784 -336902798
59106 399916553
58011 -596419087
98651 -2...

output:

40295
41570
116372
40295
40295
40295
184987
111845
111832
40295
40322
46142
101187
13367
72696
40295
40295
40295
40295
40295
40295
95984
91471
40295
17660
40295
113122
40790
51669
342301
40295
40295
40295
40447
40295
162303
40295
40295
120154
104964
40295
40295
109461
40295
137657
40295
40295
124430...

result:

ok 99901 numbers

Test #18:

score: 0
Accepted
time: 137ms
memory: 18980kb

input:

99932 99996
608 244042746
21216 883631782
22862 -620435779
12855 -389304483
58548 771520302
65920 -386272201
91317 -414034375
76503 938785012
36904 -661729890
83821 -152242789
13419 -267875950
70078 23582279
47540 -774659311
8459 -95171186
7436 -478408249
54109 263754428
89567 -187906056
25163 -6625...

output:

40571
40571
26488
40571
48405
177205
40571
86584
14511
40571
101052
113338
40571
66242
115084
192000
40571
110166
40571
126825
118959
40571
38685
40571
40571
40571
107219
40571
40571
43952
40571
32334
40571
40571
76645
105215
40571
40571
40571
106163
40571
40571
103216
40571
40571
40571
40571
50087
...

result:

ok 99932 numbers

Test #19:

score: 0
Accepted
time: 141ms
memory: 18980kb

input:

99963 99952
89647 -334330647
22261 -308934033
73792 -257689647
25963 -25760631
79860 -498024724
47121 284497236
81994 147940214
14196 -973002151
47084 197383442
12293 160152420
54938 -2551518
61349 -659687761
93458 -805176127
25880 -434678276
22261 -404568050
6382 -847812519
74448 -774446751
71958 -...

output:

106559
14428
40860
40510
27579
40510
217208
85772
40510
98814
113377
49610
109411
20994
40510
40510
40510
40510
40510
113215
42278
40510
40510
40510
83537
41422
188048
40510
41730
93128
109145
62759
38048
180517
40517
40510
40510
17015
31746
105643
40510
40510
105690
40510
40510
168442
144379
40510
...

result:

ok 99963 numbers

Test #20:

score: 0
Accepted
time: 75ms
memory: 18372kb

input:

100000 100000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 1000000000
6198 100000000...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 100000 numbers

Test #21:

score: -100
Wrong Answer
time: 94ms
memory: 18292kb

input:

100000 100000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -1000000000
48737 -100000000...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

wrong answer 1st numbers differ - expected: '0', found: '1'