QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#407211#8633. 玩星铁玩的dXqwq100 ✓627ms3924kbC++232.5kb2024-05-08 10:48:522024-05-08 10:48:53

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

100 100 0
438961768 200047102 111145 2392836 23 3640771 2667 919743151 934049944 2
95 37932 20554
330 45442 375972
261352409 254834405 183988 7032278 113 119882 12736 1049564243 972247239 1
49 218421 13864
440650630 178164276 223065 7397754 179 181797 2336 716200439 97202456 1
51 42561 5550
23386115...

output:

111145
183988
223065
134385
458046
142066
157723
587246
538487
444635
514009
557213
429011
438249
133260
659175
313811
110523
336403
182425
803622
159578
152318
265885
208982
396211
144513
255123
859722
342716
208061
364803
334286
164047
822562
190126
666913
747454
254382
269065
638690
527914
334519...

result:

ok 200 numbers

Test #2:

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

input:

100 100 0
208008567 242947934 125753 6841546 20 51618 16079 198841853 530452409 1
43 17690 13630
409569464 263944225 234003 8061026 288 164142 90907 590101644 259739877 9
105 97357 46932
209 39990 66868
506 107462 413244
110 73752 84320
151 186115 180877
176 213042 564930
220 104667 96225
166 30829 ...

output:

125753
234003
696587
827998
137342
159505
394779
122223
371966
839701
351540
715078
528351
761036
318314
149557
857283
157936
557784
614110
768980
147085
117506
140763
417177
557011
366116
301303
282862
143695
324058
722376
211886
184168
290482
304312
360397
149803
216098
301334
108134
250539
711550...

result:

ok 200 numbers

Subtask #2:

score: 10
Accepted

Test #3:

score: 10
Accepted
time: 1ms
memory: 3804kb

input:

1 1 1500
226815065 264873470 226173 595493 45 1613672 2315 375262117 865540937 1
154 260049 772964
259538107 193360910 561356 1364372 28 371406 23857 757469323 26089491 1
52 158928 16948

output:

110754
550292

result:

ok 2 number(s): "110754 550292"

Test #4:

score: 10
Accepted
time: 1ms
memory: 3764kb

input:

1 1 1500
360868868 204396871 199168 2909707 32 990121 129561 992831342 427688899 1
75 19627 119321
204495792 215147845 465681 6814522 34 196047 64146 269563526 819073330 1
138 151269 75350

output:

-42
249290

result:

ok 2 number(s): "-42 249290"

Test #5:

score: 10
Accepted
time: 0ms
memory: 3704kb

input:

1 1 1500
322037220 236285759 252271 861712 478 7824827 84178 183719912 393434395 1
233 88058 779942
315601322 512724773 261529 7841493 55 2053354 201333 520631428 1005550583 1
21 16400 15111

output:

104567
9163

result:

ok 2 number(s): "104567 9163"

Test #6:

score: 10
Accepted
time: 0ms
memory: 3752kb

input:

1 1 1500
475095502 258211295 149841 781426 126 1201540 1636 360140176 728522923 1
256 42187 540186
164856847 173398719 581750 1417342 128 7039472 811143 687999106 771965732 1
27 60226 7650

output:

3813
577544

result:

ok 2 number(s): "3813 577544"

Test #7:

score: 10
Accepted
time: 0ms
memory: 3816kb

input:

1 1 1500
283238349 268174632 139974 1389686 42 419229 219249 448350307 359147124 1
24 51526 13141
157138770 138664125 590770 4607607 288 42645 1861 771699330 118318779 1
108 24277 100870

output:

139974
397420

result:

ok 2 number(s): "139974 397420"

Test #8:

score: 10
Accepted
time: 0ms
memory: 3804kb

input:

1 1 1500
436886462 290195869 386974 2034748 138 47822 2901 624836106 694235652 1
22 17729 4536
410313392 336666367 142804 1920153 287 226228 5131 939067008 958410217 1
175 74029 202653

output:

381540
-22

result:

ok 2 number(s): "381540 -22"

Test #9:

score: 10
Accepted
time: 0ms
memory: 3804kb

input:

1 1 1500
244818794 300447905 471068 2605119 132 5230870 91718 713046238 324892620 1
35 158894 18722
536741408 301113903 705695 5634577 417 275242 177665 1022767232 304763263 1
46 65283 13287

output:

-472
627765

result:

ok 2 number(s): "-472 627765"

Subtask #3:

score: 25
Accepted

Dependency #2:

100%
Accepted

Test #10:

score: 25
Accepted
time: 0ms
memory: 3748kb

input:

1 1 1500
398054831 322066081 144714 2984121 109 931243 1273 889466501 659948380 8
42 80265 5026
64 30934 13908
41 51482 21575
44 22641 24979
126 146959 160079
425 28233 773426
88 18551 73427
263 60001 317290
498259272 224300500 154106 8150893 142 108727 65511 243210134 352914964 6
38 217950 32513
14...

output:

-63
128340

result:

ok 2 number(s): "-63 128340"

Test #11:

score: 25
Accepted
time: 0ms
memory: 3808kb

input:

1 1 1500
148148525 343192738 476402 4920812 247 100683 74899 1065886764 995036909 5
61 127469 6838
26 91687 4570
159 193891 120872
46 122214 46064
31 30271 6851
417746349 333606085 126038 5501458 42 908725 15093 487785345 518070594 8
209 39334 141175
46 38819 5991
202 60395 685303
20 174200 9688
20 ...

output:

397312
-12

result:

ok 2 number(s): "397312 -12"

Test #12:

score: 25
Accepted
time: 0ms
memory: 3812kb

input:

1 1 1500
359255952 353969054 694851 546859 32 32992 967269 80355072 625693877 7
122 60705 63663
21 30425 11196
33 24285 32126
47 27640 9520
339 21179 1001736
90 69283 238482
56 51925 60819
186202424 306001684 318334 753075 81 4839259 696004 823147937 794833177 9
48 100510 4295
450 221958 802180
339 ...

output:

298583
207018

result:

ok 2 number(s): "298583 207018"

Test #13:

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

input:

1 1 1500
166955023 364253874 855853 982109 324 6732923 99257 168565203 256383613 5
325 37270 981340
45 155482 5889
50 58544 4449
216 174912 187860
187 56513 189168
183169106 144564664 814968 1993974 180 1067669 6168 237516814 62093907 9
20 35721 12182
157 77592 673491
61 158951 25835
209 220564 7596...

output:

709557
59724

result:

ok 2 number(s): "709557 59724"

Test #14:

score: 25
Accepted
time: 0ms
memory: 3812kb

input:

1 1 1500
512314233 375095726 641760 999054 472 1629023 219418 256775335 960782405 8
113 32227 47228
44 97078 14889
466 74144 361517
21 77111 12151
73 53373 23236
38 199857 4360
17 64975 6665
80 54132 56717
268102576 505958693 406739 2159187 29 39029 42048 783892628 1005793310 10
90 170017 114258
27 ...

output:

617844
-169

result:

ok 2 number(s): "617844 -169"

Test #15:

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

input:

1 1 1500
320424313 385872050 380724 1533811 492 976905 467953 344985467 591406605 2
186 19706 178245
52 38746 7185
500924135 215861677 257172 3896590 137 65152 36027 704512666 502614196 1
255 127609 528786

output:

380724
-412

result:

ok 2 number(s): "380724 -412"

Test #16:

score: 25
Accepted
time: 1ms
memory: 3736kb

input:

1 1 1500
224292006 428059827 797959 2948889 171 3863021 3617 697924297 187841838 1
116 86906 31154
442248979 146553162 138664 5349508 27 6173900 29068 953362551 1050573969 5
302 77392 621514
54 145482 6088
301 48367 474945
110 87100 123676
89 19686 86464

output:

752663
-113

result:

ok 2 number(s): "752663 -113"

Subtask #4:

score: 15
Accepted

Dependency #2:

100%
Accepted

Test #17:

score: 15
Accepted
time: 471ms
memory: 3884kb

input:

100 100 10000
435273563 438901679 198400 3089222 152 1421038 518269 786134429 892207862 1
416 37108 517226
165770164 245970713 171618 2932429 417 38141 758627 1037062775 396894248 1
62 40752 57607
209369900 210692653 411533 887013 109 42150 3758 206721483 577836892 1
252 69809 676824
193415905 22140...

output:

-99
-54
-128
-26
-175
-40
-185
165047
-20
-596
-157
-72
-198
417359
-37
186820
-2
389494
-35
-20
-30
-53
-49
-97
-82
-294
-36
0
-37
-16
-56
-23
-63
280699
-109
-44
-75
-63
-298
-97
-121
-18
-378
-20
-32
-759
220500
-3
-16
-66
-6
-112
-67
-6
404864
-156
-41
184062
-161
-19
-67
346855
-181
-5
-144
-82...

result:

ok 200 numbers

Test #18:

score: 15
Accepted
time: 498ms
memory: 3776kb

input:

100 100 10000
232509736 439657642 264004 672920 17 6615147 2883 987583984 236981501 1
245 65385 703811
333882520 228935625 710188 802654 28 495292 40191 278295888 703341617 1
139 25597 1024450
318514878 440396611 734170 4020629 19 1532628 5635 720902410 1029575765 1
377 233846 792104
196630157 38104...

output:

-18
-77
-32
97776
-27
-177
-2
-228
-1
-807
-107
-57
-35
-156
-158
-53
-2
-36
-320
-156
-119
-29
-62
-55
-33
-30
-8
225691
409389
-23
-57
-83
-17
-18
-513
-73
-41
-5
-21
-7
0
-112
90814
-19
-19
-28
-20
-22
486133
-216
-110
-6
-27
-22
529710
181288
223153
-144
-17
594797
-19
295567
-68
-1473
-13
-13
3...

result:

ok 200 numbers

Test #19:

score: 15
Accepted
time: 515ms
memory: 3784kb

input:

100 100 10000
184958752 265796738 265874 2817370 61 61970 4020 506283789 789477120 1
45 55618 16942
363860262 331606020 361805 1531662 157 82319 235613 716524657 956260469 1
64 92583 119819
379798547 440386019 439122 3808205 42 51711 131010 110499896 641156248 1
119 96795 29507
510786988 526588997 8...

output:

-52
-29
-24
-39
-1
-484
-297
296651
124708
-218
-27
-7
-24
-57
-196
-30
-18
-11
-10
-38
-136
265658
-69
-28
-25
-35
-39
226568
780363
-112
-7
-51
-3
-137
370469
-80
-13
-62
-2
-100
-12
-44
-64
-41
-87
309025
286957
-41
171391
-198
648968
-12
-54
-20
-50
-122
-1
-215
-162
-63
-154
-66
403659
-226
-44...

result:

ok 200 numbers

Test #20:

score: 15
Accepted
time: 489ms
memory: 3880kb

input:

100 100 10000
357082358 174414273 679770 7194375 189 498093 5494 859189851 385879585 1
28 258713 6320
197588572 190225384 217790 652254 145 1761245 14946 1051292782 489058000 1
109 98660 114986
484871448 333746648 129473 3047903 37 374731 28979 67793001 311380601 1
49 154686 13956
159995476 27414729...

output:

-58
-150
-138
-54
-43
-34
-19
-20
-56
416844
410616
-24
-13
-183
-4
-3
-113
-68
-104
-331
-1
-50
-444
-40
-24
-21
-3
-38
-164
-40
-53
-15
-9
-74
-35
-31
339236
-319
-27
-105
-46
-25
-11
432032
426375
-67
-89
-117
-53
-158
-6
-125
-126
-201
-137
-26
-9
-236
-45
-13
-50
-141
-139
-19
-67
-125
-80
-86
...

result:

ok 200 numbers

Test #21:

score: 15
Accepted
time: 514ms
memory: 3900kb

input:

100 100 10000
203413017 227245674 846106 1073297 125 509359 55140 226498685 686713609 1
27 41362 9366
159030955 148476273 348658 2064989 67 142151 10573 395986538 441852098 1
289 20573 900205
415541330 267491260 400677 1167800 61 87777 2923 14311078 704475603 1
247 91013 67752
156303926 428242546 49...

output:

-636
-277
-104
376446
-24
517575
-818
-55
-147
-18
-70
-82
-179
-3
-39
261203
-83
-54
-85
-9
-12
-216
-34
-183
0
-81
-26
-290
-23
-212
-28
-87
-53
-78
-34
-209
-323
-11
46282
-49
-47
-505
289654
-8
-61
-194
-8
-209
-306
-23
-84
-6
-53
-28
-28
-23
-82
-52
-41
-11
-270
-30
-11
-148
266061
-15
-45
-29
...

result:

ok 200 numbers

Test #22:

score: 15
Accepted
time: 505ms
memory: 3884kb

input:

100 100 10000
164431964 259134563 582304 3062836 114 8358960 28897 491129080 652426338 1
40 21738 29354
269367832 177277726 160774 1584631 419 1159289 4151 647054440 628296582 1
32 28444 31761
158148308 389394843 238918 6437579 226 125358 1394 1055989963 725571132 1
218 100010 251084
396934636 30616...

output:

-65
-501
-25
-52
-112
-28
-6
-113
-4
-442
670995
-668
-255
-16
-252
-7
-15
-115
-23
-38
-31
-27
0
-10
-138
-18
-71
-293
-30
-10
-226
-416
-18
-53
-197
-132
-20
-209
-9
-99
-32
-215
-149
356040
-699
-141
-33
43543
-49
-145
-209
-26
-193
-143
-19
694821
-281
-60
-61
-111
-20
-19
-136
-113
-14
-335
-13...

result:

ok 200 numbers

Test #23:

score: 15
Accepted
time: 438ms
memory: 3900kb

input:

100 100 10000
394301090 156805706 264470 8298908 282 308658 55409 755857779 618139066 1
107 119891 124157
245891679 339744685 205570 2091538 25 47767 246078 898122342 814839370 1
426 38310 625015
170510474 241663057 293429 1078825 90 131289 391813 1023959791 746666661 1
213 109004 289728
502779391 1...

output:

-39
-25
-25
-108
-13
-3
-287
-110
-12
-123
-62
-161
-378
-5
-6
-5
-9
-244
-11
-99
-3
-17
690472
-24
-94
-374
-28
-217
-254
-59
-313
-31
-241
-11
-22
-194
-67
-143
403151
-181
-36
-40
-27
-107
-296
-42
-8
-157
-6
-705
-88
-60
-61
-8
-18
-61
265419
-221
-27
-59
-289
-122
-24
-603
-61
-95
-114
-21
-128...

result:

ok 200 numbers

Subtask #5:

score: 15
Accepted

Test #24:

score: 15
Accepted
time: 553ms
memory: 3896kb

input:

100 100 10000
355993747 188694627 534548 554718 101 5765011 39160 1020488174 583884563 6
477 0 993801
44 0 64963
188 0 474356
72 0 19241
142 0 182474
164 0 305800
208538388 277252475 548370 2684492 463 92750 1408 542013440 991831316 9
212 0 913344
352 0 324349
56 0 7244
43 0 47510
188 0 162746
122 0...

output:

-52
-192
-17
-3
-67
-77
-61
779568
-139
-48
-56
-723
864773
-214
-7
-54
-9
-312
-530
-212
-21
-110
-416
-1493
-114
-6
861705
-20
-48
-106
-79
-341
-9
-12
-89
-554
-20
-1259
-98
-190
-132
-22
-305
-139
-264
-9
-27
-51
-252
-35
-249
-239
-79
-181
-114
-729
-5
-714
818909
811918
-287
-144
641648
-159
-...

result:

ok 200 numbers

Test #25:

score: 15
Accepted
time: 581ms
memory: 3824kb

input:

100 100 10000
317260395 489496051 377450 1484593 185 271797 1448 211376744 549662827 1
48 0 8901
198567425 397093561 451555 1069382 187 1638505 269080 326516322 113986515 1
71 0 254201
462914382 484697449 785117 2040476 221 155614 148773 959801144 788923255 6
60 0 15887
35 0 12382
90 0 82356
38 0 11...

output:

-49
451555
785117
-556
608234
-125
-28
-62
638812
-133
-53
-160
725181
772231
-45
-17
796994
-44
-111
-13
557396
-32
661212
-83
804881
430965
479551
-75
-19
-328
-123
-115
-32
-62
402347
-83
722719
470959
-11
-57
-139
593448
-11
588749
-73
-92
-13
-9
-70
428632
810890
756125
-280
-12
-19
-50
703960
...

result:

ok 200 numbers

Test #26:

score: 15
Accepted
time: 603ms
memory: 3788kb

input:

100 100 10000
220368154 532175364 133316 6624195 20 1861952 29988 564217271 146032524 8
440 0 484929
34 0 33897
27 0 6465
153 0 115506
52 0 4592
154 0 135019
57 0 12549
41 0 15793
172027937 344958324 726211 1241433 344 573851 763988 814221436 859979886 5
259 0 343128
239 0 476537
119 0 196913
81 0 7...

output:

-19
726211
-210
811913
-65
-75
-61
-51
-24
-35
675562
-18
710749
-5
-1
-84
-130
-87
-121
-325
-212
-274
663676
-494
793194
-153
-86
-328
-12
-157
-8
-68
-199
-44
-262
-79
-51
-296
-31
744054
-236
-31
-21
-119
771881
678884
-11
-5
803231
-139
-52
-156
-8
671198
-81
-131
-193
708279
-31
-36
-8
-40
-2
...

result:

ok 200 numbers

Test #27:

score: 15
Accepted
time: 531ms
memory: 3920kb

input:

100 100 10000
181452668 295642887 451576 788169 144 129798 1020677 828913201 111810789 10
52 0 5309
119 0 48673
38 0 26864
78 0 41914
60 0 27511
63 0 41669
401 0 342178
499 0 667735
81 0 35276
138 0 586443
182325950 313821971 508803 3562493 182 445577 693598 519116439 438313257 3
39 0 59408
43 0 558...

output:

-313
-26
-30
-40
-507
-23
789327
-515
-693
-324
-168
-32
-21
-123
-332
-69
-63
-80
-37
-138
-11
-23
-201
-41
-150
835190
-8
783786
-43
844009
-34
-18
-168
-132
-124
-83
-169
-359
-103
-476
-107
-31
-22
848830
-184
-443
-265
-14
0
-142
-87
362592
-31
-514
788139
-37
-307
-6
-9
-160
-93
-93
-4
-372
-2...

result:

ok 200 numbers

Test #28:

score: 15
Accepted
time: 627ms
memory: 3788kb

input:

100 100 10000
143552975 327545868 616935 1357196 462 1653839 1721 19801772 77556285 3
37 0 14185
50 0 18223
59 0 21078
395333578 186306779 607186 5140753 24 8237691 1810 170426275 32141517 8
28 0 11969
57 0 23852
24 0 12156
58 0 29899
57 0 10242
197 0 406362
166 0 458343
60 0 34404
340590770 3092492...

output:

-3
-333
-37
-173
778991
-119
-134
-43
-113
-105
845704
-10
-29
-12
755158
-125
-135
-310
-94
741477
-10
-183
-46
-64
-15
-8
-43
718009
-11
-481
-29
714615
-14
-105
-38
-36
-83
-29
-64
-5
805228
-23
-378
-65
-167
-28
-71
-140
-243
-386
-1
-298
-114
-49
-34
102805
-76
-53
-46
-49
-229
-7
-179
-67
-160...

result:

ok 200 numbers

Test #29:

score: 15
Accepted
time: 566ms
memory: 3828kb

input:

100 100 10000
257530613 381034265 240878 7760464 40 3875013 276841 460852430 378357542 10
58 0 21424
101 0 28298
52 0 12301
201 0 628975
142 0 103797
21 0 16366
87 0 42866
58 0 53175
54 0 55369
16 0 8754
532045428 177845095 257030 5196155 49 186666 822548 556022490 408946490 3
198 0 693446
162 0 193...

output:

-6
-417
-48
-68
-43
807599
-16
-47
-5
-73
-157
-4
698360
-14
-12
-43
-537
-85
-348
-9
-17
-38
679555
-40
-53
-30
-2
-4
-61
-1
-211
-235
112088
-40
-64
-89
-22
-118
-12
830994
-32
634887
-82
-6
-16
-15
-3
-4
671944
-59
-75
-114
-296
-19
-25
852152
-1
-40
-45
-115
635660
-107
-319
-11
-35
-29
-42
-42
...

result:

ok 200 numbers

Test #30:

score: 15
Accepted
time: 577ms
memory: 3816kb

input:

100 100 10000
430398441 423254825 791983 982293 19 39558 1950 813791260 1048469063 7
225 0 298888
43 0 42235
60 0 13056
78 0 26248
230 0 252352
42 0 13926
45 0 4380
358735759 152558073 247600 5879787 461 357704 2386 251534423 841640204 1
22 0 13405
265525986 164203983 753475 2003603 20 3196147 7366 ...

output:

791983
-8
-164
-151
-20
-151
-24
-84
-93
-109
-18
-376
-163
-63
-6
-49
-2
-70
-107
-11
-94
804947
830181
-36
-85
-5
-14
-204
-143
-160
-70
-63
702977
-89
-224
-8
-20
-51
-5
-171
-98
-36
-300
-286
-17
-72
-154
-61
-30
-13
-76
-409
-113
-105
-52
-118
-24
-57
-178
-69
-183
-18
-25
-69
-7
-238
-19
-67
-...

result:

ok 200 numbers

Subtask #6:

score: 30
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #31:

score: 30
Accepted
time: 397ms
memory: 3840kb

input:

100 100 10000
199456397 197263077 689183 3206096 60 224800 26570 92889963 644904295 10
119 40534 178034
102 82963 21499
291 23155 711719
87 74841 76239
73 64982 103376
18 63934 11490
387 163044 307292
139 90204 73625
42 180413 12141
78 77226 25179
209321115 311802670 272980 841321 256 81277 1031 592...

output:

-239
-5
-18
-75
-147
-31
610537
-204
-146
467586
-314
-1
333290
-102
-144
-74
-120
-104
-62
147563
-152
-71
0
-26
132630
-175
-171
190579
271081
354815
200638
-471
-2
121047
180466
-19
174310
-166
-80
-1
-53
403879
-44
-345
-14
-156
-44
-179
165885
-46
-225
446926
-114
-68
-43
92384
-91
244805
-484
...

result:

ok 200 numbers

Test #32:

score: 30
Accepted
time: 406ms
memory: 3844kb

input:

100 100 10000
160508144 229151965 132549 4703453 32 3042690 56862 357520358 610617024 1
234 25722 520773
396857729 151306689 124675 2566636 52 4557549 96462 354943568 298281252 2
57 218065 11610
99 241737 118794
144984958 413177582 270769 1154544 409 1572401 158585 225716813 390620131 6
36 70584 191...

output:

-36
-14
-97
-91
-64
-426
-9
-154
-17
-447
-82
-288
-13
-146
-494
-279
-631
-122
-716
-10
-98
-80
-517
-505
-49
-522
-39
-132
-91
-22
-213
-349
-40
-477
-31
-31
-293
-198
-414
-217
-29
-5
-24
-157
-130
-33
-77
-24
-396
-30
-29
-137
-60
-81
-18
-74
-12
-153
-317
-18
-24
-69
-50
-146
-62
-84
-2
-19
-9
...

result:

ok 200 numbers

Test #33:

score: 30
Accepted
time: 359ms
memory: 3924kb

input:

100 100 10000
256858931 261040870 157020 658687 248 251267 40611 622150752 576329752 6
18 126750 6967
144 208241 199706
74 120491 46325
47 82941 5268
56 19845 18653
55 17493 36449
523121967 299399793 847809 1042833 54 317174 44782 757679522 649815705 4
25 35939 4158
99 218664 175986
241 31355 325343...

output:

-38
-57
-103
-1
-40
-65
-4
-425
-3
-50
-81
-242
-79
-110
-203
-34
-23
-20
-10
-307
-17
-51
-195
-89
-62
-39
-41
-474
-14
-54
-144
-167
-53
-53
-328
-17
-178
-421
-2
-10
-363
-160
-25
-106
-97
-157
-266
-112
-24
-96
-11
-59
-15
-11
-51
-802
-97
-13
-334
-66
-196
-25
-269
-766
-23
-32
-216
-161
-67
-1...

result:

ok 200 numbers

Test #34:

score: 30
Accepted
time: 467ms
memory: 3864kb

input:

100 100 10000
217910662 158712029 398788 1608455 116 2906314 71272 886846683 542140785 5
46 59048 45435
121 151433 198072
114 49355 55240
241 70607 660232
231 36764 66039
281234241 488831969 415923 1235188 62 1465856 28380 729353466 974158618 2
39 25056 32914
435 53160 781507
535203353 480657660 364...

output:

-478
325094
-23
-88
-21
-22
466270
-76
-143
-153
-141
-366
-137
-38
-109
-65
-74
-68
-36
-34
-373
-772
-815
-60
-44
-21
-327
-539
-26
-72
-15
-165
-211
-191
-8
409420
441336
-60
-36
-34
-43
-80
-87
403935
-220
-5
-24
-168
-18
-68
-556
-37
-42
-161
-39
-6
-127
-11
-4
-194
-33
-204
0
95463
-102
-310
-...

result:

ok 200 numbers

Test #35:

score: 30
Accepted
time: 471ms
memory: 3896kb

input:

100 100 10000
159836430 243432319 360193 876314 30 349643 7224 518785912 808654770 9
219 35454 128993
90 91671 94416
91 63489 28469
107 251961 197012
98 44446 98387
43 39113 5034
84 75088 111362
93 27483 91869
51 92380 36244
177395756 411692205 154223 8334922 215 64485 3910 628453311 573465962 3
25 ...

output:

-25
-72
-114
-61
-256
-63
-234
-44
-51
-136
-16
-133
-6
-374
-274
-18
500486
-43
-62
-27
-27
179283
-42
-3
-30
-196
0
-671
-194
-75
-13
-743
-68
-68
700238
-245
-117
-4
-36
-85
-22
-54
-11
-529
-43
-163
-74
-47
-26
-58
-10
-192
-3
-688
-251
-288
-67
-100
-57
-7
-294
-140
-21
-47
-102
-130
-178
-13
-...

result:

ok 200 numbers

Test #36:

score: 30
Accepted
time: 470ms
memory: 3844kb

input:

100 100 10000
255073122 410043228 127041 1682820 72 4170120 1846 783449075 774400267 2
456 25797 687468
246 97062 76328
452775043 435290989 628852 2924174 23 7424786 8465 881002426 140594513 5
53 46919 10272
140 46894 126067
47 25171 45887
398 55090 372869
66 67097 97119
463256342 306080063 296171 8...

output:

-36
-101
-238
-11
-298
-103
-151
-50
-14
-46
-50
622335
-7
-137
-297
-14
-117
-773
-112
-26
-13
-14
-76
-116
0
-103
-83
-116
-36
-16
-92
-7
-21
-170
-1
-13
-6
-354
-25
-38
-67
-3
-1
-130
-135
-41
-363
-6
413743
-98
-107
-6
-28
517032
-42
-61
-14
-82
-26
-79
-110
-9
-23
-16
-58
-23
-71
-22
-26
-50
-5...

result:

ok 200 numbers

Test #37:

score: 30
Accepted
time: 433ms
memory: 3916kb

input:

100 100 10000
216124868 441946209 229869 3561784 259 212935 3373 1048145005 740112995 6
46 211654 12886
69 69686 91009
175 160258 81785
40 252752 6796
62 29555 21521
114 17717 28358
493138901 184928304 281925 8049404 255 1408966 1043194 335368928 468082024 5
32 118725 14988
161 193333 438973
50 9070...

output:

-25
-48
-52
-214
105989
-9
-57
-12
-35
-5
-130
-18
-7
-41
-143
-364
-380
-28
-18
-38
-18
-179
-375
-87
-22
-20
-45
-107
-99
-149
-202
-8
-14
-108
-87
-120
-70
-10
-49
-145
-12
-11
-135
583443
-70
-44
-206
-124
-3
-267
-36
-170
-29
-29
-80
-39
-35
-8
-31
-146
-46
-80
-63
-174
-21
-88
-4
-17
-209
-49
...

result:

ok 200 numbers

Test #38:

score: 30
Accepted
time: 289ms
memory: 3884kb

input:

100 100 10000
252902311 231058272 508158 699315 48 104612 6727 488509262 534585974 1
42 68071 27104
232208327 289600998 434169 5992540 292 602745 3964 313933366 154677637 9
95 107015 24550
342 49892 896698
32 213020 20063
72 85683 42244
225 33551 967866
34 68029 7257
37 218554 62235
31 36482 6129
21...

output:

416308
321100
-57
757072
-69
-2
-166
468420
-34
370004
389257
-54
-24
-19
-55
-63
-57
337490
-12
-108
-12
-42
-15
188856
-138
-42
544384
-21
-149
-1
-13
-85
-151
0
-1
240732
-71
-203
-29
-45
560216
287248
-23
-215
-75
103745
-74
-44
-61
-27
-178
-90
-57
-117
-49
-115
-11
-83
411898
-107
-338
-133
-3...

result:

ok 200 numbers

Test #39:

score: 30
Accepted
time: 350ms
memory: 3824kb

input:

100 100 10000
425064560 138725568 513493 3770995 299 411098 83740 841382556 130955671 8
21 34790 9504
235 23371 326843
81 21506 145036
258 62074 492058
29 122710 16188
87 82756 177091
42 177402 17395
484 177744 608142
313619371 409788322 461151 1416923 423 70949 38996 218594185 626684962 5
55 59322 ...

output:

-63
409615
546612
-677
-10
-85
-127
-238
-20
-27
-5
-2
-22
-107
-82
-191
499612
354542
-44
-83
-471
-55
-149
-260
-245
-16
-155
-157
-31
416409
-80
-7
596028
-113
649399
297503
-122
-78
-153
-18
-187
-130
232826
-336
-310
-30
-671
-17
287163
-271
-13
-216
-19
779246
-419
-168
-58
-8
-16
-8
213138
39...

result:

ok 200 numbers

Test #40:

score: 30
Accepted
time: 464ms
memory: 3832kb

input:

100 100 10000
386789969 170614441 175216 7834505 116 5297953 42518 32336663 96733936 3
77 234850 36217
386 22834 384665
324 170605 539682
298523031 290379702 728359 7271036 171 722044 62295 702694331 1001659890 6
63 89874 30860
163 29270 474386
48 162853 23907
35 47648 38365
25 220171 11225
237 3548...

output:

-127
-15
-92
-58
-11
-56
-10
-27
-241
-49
-3
-3
-105
-39
-136
-217
-27
-579
185512
433768
552347
-115
-30
-27
-112
773309
-209
-160
-29
-13
565371
-38
-56
-67
351467
-128
-94
-88
-21
-28
-18
-15
-56
-121
-49
-53
-4
-129
-19
-80
-94
499890
-24
-268
-238
-3
-684
-25
-225
-12
-34
-179
-149
-602
-278
-1...

result:

ok 200 numbers