QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#696927#7587. Road ManagerqiuzxAC ✓1722ms314332kbC++205.0kb2024-11-01 07:57:162024-11-01 07:57:16

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

9
5
13

result:

ok 3 number(s): "9 5 13"

Test #2:

score: 0
Accepted
time: 4ms
memory: 25584kb

input:

50 50 858397672 21575781 421714252 50
50
10 30
25 41
10 44
41 45
47 47
39 42
20 38
28 47
12 15
26 32
9 25
18 26
7 15
5 8
7 31
8 37
41 42
18 21
32 32
14 35
6 22
12 26
42 45
9 23
14 14
5 6
8 24
25 43
37 38
15 46
26 43
35 48
22 30
20 45
21 49
11 12
6 46
15 45
21 43
4 40
4 18
28 37
32 38
18 26
32 32
10 ...

output:

21046
24218
11414
32468
35179
33298
22126
22012
33300
30838
23977
29055
29918
33069
18185
14871
34615
32954
35312
20094
24226
25181
33130
25535
35374
34492
24067
22758
34675
13257
23443
26215
29241
17292
15165
34743
7157
13953
19672
9730
25603
29117
31267
29055
35312
8400
2536
14565
27209
33993

result:

ok 50 numbers

Test #3:

score: 0
Accepted
time: 1697ms
memory: 301608kb

input:

100 10000 753738892 852022308 109208427 5
10000
6068 9618
3347 9710
3237 5987
428 8918
183 2017
3654 8017
6218 8094
1812 4054
783 4265
638 6139
1780 6091
1559 1706
6627 8952
2958 6234
6213 8049
1860 9764
988 8148
4992 5669
7214 9591
4245 8494
5417 9671
2840 4466
5799 8328
5436 7160
1136 1170
3134 38...

output:

1211623
682743
1361117
283679
1533910
1058719
1526089
1457348
1224581
844519
1068307
1850478
1441600
1262311
1533505
393355
533670
1750612
1431335
1079803
1078983
1572722
1403657
1554603
1871623
1742851
796103
1436810
1618909
1627701
824187
1689150
1552343
1846414
1756497
505159
1260003
174270
83303...

result:

ok 10000 numbers

Test #4:

score: 0
Accepted
time: 1690ms
memory: 306188kb

input:

100 10000 252296658 470686114 738681417 5
10000
19 9941
4573 8431
1956 8010
6495 7523
1584 9576
3805 7368
945 8568
753 6106
3261 6017
4137 4690
8260 8284
3732 7371
2222 9531
174 6288
4011 4548
7675 8100
787 5858
3504 4912
5358 9086
492 8450
4746 5765
2833 5471
6990 8945
4020 8049
2168 5355
4144 7941...

output:

14776
1154093
741074
1685175
377030
1209281
446018
873015
1360987
1773494
1873502
1195181
505818
729771
1776734
1797785
925822
1613267
1178272
383399
1687330
1382812
1510227
1121331
1279314
1165058
781005
726730
964577
989349
1175799
1824181
1485743
1279135
1225339
594598
1482362
1727286
655503
1852...

result:

ok 10000 numbers

Test #5:

score: 0
Accepted
time: 1559ms
memory: 309908kb

input:

100 10000 784936363 827067061 800454511 1000000000
10000
2056 2962
5233 5350
1346 2099
8529 8825
2358 3371
3217 6419
1175 9635
2998 7699
1494 9244
2710 5459
1647 8372
6360 8398
1256 9955
1252 1473
4171 4704
4867 7373
3208 7839
2949 8996
4731 7531
8915 9536
2199 5546
2265 6448
1463 9131
2358 2383
625...

output:

218107916833770
236956297236591
221611594649234
232654372445039
215511117763537
163015473624889
37013079700783
127182022450125
54041351200568
173843674045542
78674875729514
191084774917088
31305721956998
234464326245872
227032500475120
179858820611878
128837146174236
94963670830748
172797399335623
2...

result:

ok 10000 numbers

Test #6:

score: 0
Accepted
time: 1567ms
memory: 314332kb

input:

100 10000 72129929 485897764 129463885 1000000000
10000
383 7372
2861 4738
5799 7101
3570 9122
3175 4173
1444 7532
6191 9348
3164 6316
2122 4663
1589 2869
4784 7741
3529 5974
4792 7378
6016 8170
864 1289
1647 7570
293 1602
1054 8521
6193 9882
4543 5121
956 5006
1858 7086
4117 7517
9736 9847
7917 865...

output:

72090982299191
194600560760132
208326087759066
106457378837533
215695913806908
93645900885474
163942628341738
164031689768437
178662309764579
208841353815076
168610752734842
180880159627225
177470699352697
187964294311616
229294854382327
97557084520879
208227727138432
60656821171511
151175099594593
...

result:

ok 10000 numbers

Test #7:

score: 0
Accepted
time: 1593ms
memory: 314016kb

input:

100 10000 963446001 261040754 78671748 1000000000
10000
1308 8621
2948 6287
2647 3069
103 5392
3204 9085
7669 8375
2823 5662
6455 7017
530 4194
567 9892
2436 9869
3149 6625
3015 7571
1051 1155
30 5077
1138 9673
8598 9184
5453 8895
902 7796
2749 5653
334 2677
4818 7123
2693 8574
1945 2913
6278 7799
6...

output:

64264200768233
159631014825609
229412046850098
112894812377726
98703295232189
222675254882181
171598041130418
226137587624448
151655725634932
16103717296049
61433187417017
156336180363989
130459314798835
237120775693771
118682572200864
34995983081351
225547690108471
157054836420411
74239996440524
17...

result:

ok 10000 numbers

Test #8:

score: 0
Accepted
time: 1722ms
memory: 313404kb

input:

100 10000 64237141 422265017 577403465 1000000000
10000
1335 3887
3017 4150
13 5940
619 9252
2124 8016
6189 8581
3524 6793
5826 9716
880 1859
6383 6421
1312 3139
4259 6148
1005 2744
1353 8445
6463 9223
6923 9215
901 1803
1202 1820
1053 6563
3677 7206
7691 9391
4533 8068
4360 7698
4769 8394
1629 5350...

output:

178476322146618
212581735474540
97664015826725
32720953154164
98586242468815
182463260674934
161421747872055
146457120526990
216189917671016
238821446345616
195878926340178
194435416584804
198022374418219
69770884358102
173557137328055
184789377313284
218050741659725
224873943256047
107596574583740
...

result:

ok 10000 numbers