QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#267391#3274. 随机游走flower#100 ✓143ms3720kbC++201.1kb2023-11-27 10:53:362024-07-04 03:09:11

详细

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

10
1 4 13
5 5 13
4 1 5
5 4 19
5 3 13
4 3 5
5 5 3
5 0 13
5 3 11
5 2 11

output:

0
9
1
14
9
0
0
4
0
3

result:

ok 10 numbers

Test #2:

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

input:

10
2 1 83
1 5 13
5 5 79
5 2 13
5 3 73
5 2 2
5 5 3
2 5 31
2 5 31
5 4 19

output:

2
0
48
1
22
0
0
6
6
14

result:

ok 10 numbers

Test #3:

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

input:

10
5 3 881
4 3 857
5 1 709
5 2 991
4 4 523
2 1 709
3 4 613
3 3 109
5 2 983
2 0 461

output:

22
15
8
14
21
2
12
9
14
1

result:

ok 10 numbers

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Subtask #3:

score: 25
Accepted

Dependency #2:

100%
Accepted

Test #1:

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

input:

10
1 4 13
5 5 13
4 1 5
5 4 19
5 3 13
4 3 5
5 5 3
5 0 13
5 3 11
5 2 11

output:

0
9
1
14
9
0
0
4
0
3

result:

ok 10 numbers

Test #2:

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

input:

10
2 1 83
1 5 13
5 5 79
5 2 13
5 3 73
5 2 2
5 5 3
2 5 31
2 5 31
5 4 19

output:

2
0
48
1
22
0
0
6
6
14

result:

ok 10 numbers

Test #3:

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

input:

10
5 3 881
4 3 857
5 1 709
5 2 991
4 4 523
2 1 709
3 4 613
3 3 109
5 2 983
2 0 461

output:

22
15
8
14
21
2
12
9
14
1

result:

ok 10 numbers

Test #4:

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

input:

10
2 95 487
4 100 601
3 83 311
5 34 821
2 17 211
5 99 499
4 99 233
5 63 883
5 98 41
2 100 491

output:

96
216
294
79
18
95
186
825
8
101

result:

ok 10 numbers

Test #5:

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

input:

10
5 100 1153
5 100 6367
5 99 9137
2 100 1217
5 99 4463
5 100 2441
2 100 4783
5 98 4289
3 100 2477
3 100 907

output:

245
4123
828
101
2452
1727
101
2624
175
838

result:

ok 10 numbers

Test #6:

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

input:

10
5 98 73897
5 43 67679
4 56 25457
5 41 27943
5 25 81931
5 98 71881
5 34 75161
5 87 56237
5 53 20113
5 88 67523

output:

70617
20892
8020
17580
3208
8816
9110
55445
4114
22492

result:

ok 10 numbers

Test #7:

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

input:

10
5 99 817646801
5 98 874706501
5 99 709025203
5 33 557309839
5 58 997029919
4 77 665716297
5 98 872663633
2 100 406914323
5 99 91695431
5 77 351306607

output:

457678
440102
457678
8210
61712
19710
440102
101
457678
176862

result:

ok 10 numbers

Test #8:

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

input:

10
5 15 23
5 70 17
5 51 71
5 99 71
5 98 11
3 82 71
5 100 43
4 49 5
5 50 3
4 100 89

output:

11
14
2
12
3
31
2
1
2
33

result:

ok 10 numbers

Test #9:

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

input:

100
100000000 2 870093649
54714882 1 168384413
100000000 0 997415491
100000000 2 646551557
100000000 2 530441423
100000000 2 423084341
87100099 2 852128831
72104934 48 140019563
100000000 1 157370611
100000000 25 686224471
97123306 20 229903939
100000000 2 283605827
72437516 51 752676721
100000000 3...

output:

399999994
109429762
99999999
399999994
399999994
399999994
348400390
4412327
42629387
305477865
140122602
116394167
297834871
77913478
399999994
170488895
35877128
399999994
45289262
159925478
144064342
4361061
64873425
115583848
2936376
79847989
139806710
99999999
83747767
99999999
11618238
1923285...

result:

ok 100 numbers

Test #10:

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

input:

100
100 97 486858877
6 99 936664787
35 68 955179107
100 97 980074217
13 95 354830533
91 88 619029643
100 17 492764407
30 85 883899997
64 62 725605807
12 98 503049331
100 99 991095073
100 58 403159951
15 98 790155329
87 87 588690647
63 61 115629571
31 90 128330227
100 97 775118089
100 0 506940491
100...

output:

465150343
4093824
169448572
48384843
3928800
397142951
11010046
554149827
575504034
501244910
944786829
395783213
496026220
180009372
26167434
83699618
640457350
99
394
366667270
375205965
394
36533948
535235053
107921438
394
99
264651908
87421879
198
171320149
99
230326313
57110389
114555167
195325...

result:

ok 100 numbers

Test #11:

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

input:

100
100000000 1 5591
100000000 1 59
100000000 74 9623
61255304 0 5347
100000000 0 733
94660926 1 8009
100000000 1 1777
100000000 2 2087
100000000 1 3359
46345392 0 3929
100000000 84 3299
100000000 5 41
25566271 50 4517
100000000 1 4993
100000000 1 1031
56135327 45 3529
100000000 0 6367
100000000 7 7...

output:

4337
28
1118
71
474
5108
425
1400
1779
2836
1547
13
684
390
432
2451
6264
5926
394
4028
838
4868
606
5665
5535
871
18
442
201
264
1173
260
1866
137
3411
438
432
1993
1628
1290
85
26
4515
446
3029
970
2175
3364
16
293
7216
8771
4196
197
547
3013
2973
6161
4381
4740
3065
2165
1298
624
8148
1298
805
51...

result:

ok 100 numbers

Subtask #4:

score: 20
Accepted

Test #12:

score: 20
Accepted
time: 0ms
memory: 3592kb

input:

3
50 1176 996401303
32 2987 155037041
50 2988 151905847

output:

648908787
66401579
38490965

result:

ok 3 number(s): "648908787 66401579 38490965"

Test #13:

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

input:

3
29 2998 246545267
36 2974 478356289
50 2988 26040349

output:

56503230
47120338
17627948

result:

ok 3 number(s): "56503230 47120338 17627948"

Test #14:

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

input:

3
50 786 47167339
6 1927 749106907
50 2988 256035071

output:

11176882
251691451
148363749

result:

ok 3 number(s): "11176882 251691451 148363749"

Test #15:

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

input:

3
26 2183 384727177
30 261 964145569
50 2157 202689667

output:

44694850
83010044
86414622

result:

ok 3 number(s): "44694850 83010044 86414622"

Test #16:

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

input:

3
50 2987 113062769
50 2991 421297439
33 1497 159643999

output:

74284538
54636736
28803039

result:

ok 3 number(s): "74284538 54636736 28803039"

Test #17:

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

input:

3
20 2658 631506563
42 2993 985976993
50 2991 125834273

output:

463245633
350919151
103501536

result:

ok 3 number(s): "463245633 350919151 103501536"

Test #18:

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

input:

3
50 1666 935697701
50 2991 97880953
50 2989 379438277

output:

884846091
60999820
181024193

result:

ok 3 number(s): "884846091 60999820 181024193"

Test #19:

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

input:

3
6 821 460911571
50 1962 394748467
24 667 288131461

output:

265269934
191749401
30141866

result:

ok 3 number(s): "265269934 191749401 30141866"

Test #20:

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

input:

3
28 2996 4639
50 2989 5503
22 860 8317

output:

1707
4223
5631

result:

ok 3 number(s): "1707 4223 5631"

Subtask #5:

score: 10
Accepted

Test #21:

score: 10
Accepted
time: 64ms
memory: 3588kb

input:

100000
131041815 82425709 973269833
1000000000 133485914 914586097
1000000000 656456127 710371681
997582513 565181843 562372439
408132767 155729069 769555159
1000000000 273473664 948428059
1000000000 316183756 256824341
1000000000 545457176 316221341
1000000000 543611855 725299283
1000000000 2768170...

output:

170639233
354369375
437567644
510243471
474848560
683948739
33009378
221152396
105920857
235598916
161992388
59427021
31554528
76060516
176637795
218796785
781847957
359069190
45082252
154665745
340449824
792541264
629971088
226324230
11077269
42982894
109551810
205443463
314317005
817673349
1268759...

result:

ok 100000 numbers

Test #22:

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

input:

100000
1000000000 502051416 761
1000000000 317253303 7079
261914492 28544766 7109
1000000000 53098857 4523
1000000000 626990095 1511
1000000000 595867001 9941
1000000000 134705841 509
986311533 78215730 7213
829350538 787063677 9241
436495419 125319672 1303
989338444 679402972 9397
1000000000 173031...

output:

250
1512
1089
1203
538
5788
190
12
255
712
2274
1728
2543
292
312
1852
6568
784
1433
1908
200
2101
1177
2365
2989
1746
5384
765
7090
1864
4356
188
524
5623
2865
3188
174
1506
4888
281
1112
1792
4396
931
321
93
65
107
6980
899
1847
4012
346
4648
1536
4521
2264
5847
1182
5441
12
3148
7587
195
4614
328...

result:

ok 100000 numbers

Test #23:

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

input:

100000
702852278 555025604 611297
1000000000 318514972 242863
1000000000 22120024 742243
1000000000 975426496 249211
1000000000 267029366 511559
1000000000 327097680 860077
1000000000 823476501 456293
1000000000 730941227 702179
381858613 120644232 425279
445734908 320741873 113467
842079348 1233863...

output:

86315
16589
175584
22626
346882
324726
265525
287298
285360
11423
54114
118519
83977
213991
133972
451439
276699
721426
238834
247513
312761
227632
105550
264309
315865
244154
161747
60552
584353
32428
321816
132040
119685
655226
939668
298727
55273
412243
24001
32786
104763
411248
529986
305454
359...

result:

ok 100000 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 #24:

score: 30
Accepted
time: 143ms
memory: 3708kb

input:

100000
1000000000 561821996438178002 242636633
1000000000 999999999999999997 489547117
1000000000 836979833491065855 874519043
729322083 753284395683366209 165425027
677073689 12821459381633350 265239329
1000000000 719831891280168110 728479657
393520459 999999999883007268 104226893
1000000000 999999...

output:

75133726
18344308
192314854
164315351
243427582
512656757
10114630
176166088
311485313
252940815
293089539
161453949
321987460
98812943
845766843
26213562
33715600
227749578
28278191
12230688
205753875
90523958
269268992
437186844
364073602
192649797
26953690
217728009
175181256
46947100
20364589
10...

result:

ok 100000 numbers

Test #25:

score: 0
Accepted
time: 143ms
memory: 3596kb

input:

100000
720391948 105211957959724603 419235967
1000000000 999999999000000002 112364843
1000000000 999999999999999999 999723349
861226109 156370424192397004 199274189
1000000000 999999999361556806 329467223
1000000000 410555131230178290 181845959
1000000000 1000000000000000000 541287113
464881695 9999...

output:

191819734
32793180
364952860
81435932
215736073
141894856
353051945
7026306
488005458
479691698
378192388
393801500
179952174
228056164
240410024
365959390
138376040
8002554
319177656
798963912
359062261
56965582
430938170
3287736
199250689
465572763
91826090
101567600
27017925
325953270
328434003
8...

result:

ok 100000 numbers

Test #26:

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

input:

100000
1000000000 1000000000000000000 210436063
680815716 999999999731860186 582648163
369028366 999999999734148539 233675669
599993461 178605705776586661 435466789
1000000000 742624441257375560 41723743
1000000000 429493221377389181 642362011
1000000000 537068938574594570 932254243
300773934 999999...

output:

74405612
97978967
70222096
16964737
21159613
127557170
620236750
98123581
860054213
202989052
845300903
119508788
905398971
477495886
638113500
115031959
53640267
520058487
28788408
269157324
10479305
68771282
21091417
203543109
399835377
305929152
166234208
100215113
12914083
413900895
139192613
16...

result:

ok 100000 numbers

Test #27:

score: 0
Accepted
time: 143ms
memory: 3660kb

input:

100000
1000000000 999999999999999997 348824303
801559774 999999999853475481 835032287
1000000000 999999999608318382 828624347
1000000000 885704253836665539 110446657
487089021 999999999618702282 92323331
332801271 999999999771205748 844453391
934839965 593669944323126732 593446561
1000000000 9999999...

output:

142283332
362242421
15356792
10955707
66811962
202706937
187803999
528598891
12768914
2810401
380102864
753409656
188851057
456956647
79030901
190674770
185701885
29505518
14175477
505721290
117087911
645984197
211211891
81757
2189431
137467071
1128960
34247263
62417553
412991
178435553
791326521
30...

result:

ok 100000 numbers

Test #28:

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

input:

100000
253639979 999999999987964766 864561497
956480964 999999999374366780 544647967
1000000000 659617710340382290 617331277
383613839 999999999785756780 829732093
266480612 999999999846060973 787389271
1000000000 164759040835240957 974488681
21624145 999999999992030978 620961469
397955965 583758901...

output:

364085619
303513944
93245229
6383319
147449169
266997041
46068487
15102789
582898156
311529903
83524221
149082506
341397895
704260096
488875035
40423477
271754130
333151218
493383859
278172397
44776710
165938483
396230533
545966245
21615653
120352281
350202918
172077614
460255184
52874418
174577956
...

result:

ok 100000 numbers

Test #29:

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

input:

100000
426777845 262237756187900071 12494893
875392615 999999999221005980 927324103
694237937 31239464434094561 487319461
50767376 826137740764418373 514505549
801145922 999999999610861341 955244359
318679319 112407381708620668 558243703
578841119 914597081910783497 619609279
1000000000 100000000000...

output:

6495811
19255940
222746748
349943610
32573571
292527334
359237725
32183714
88766443
196126396
47529296
315558887
174654942
143566987
2058337
61311611
270262343
5115022
68999192
199244928
74873998
190151708
704724963
298961232
518157002
86304818
347359345
70250045
219318555
53233899
160492972
2176585...

result:

ok 100000 numbers

Test #30:

score: 0
Accepted
time: 140ms
memory: 3672kb

input:

100000
1000000000 799085064904903722 166215523
1000000000 999999999999999999 918721619
1000000000 999999999901840900 679805677
701977881 935072164280301642 50182549
635342005 499850717323497013 51893251
1000000000 222164951777835049 678382511
532341185 999999999576017598 573065197
653510007 99999999...

output:

155045232
443491614
520372298
12217654
49901083
602280695
67886550
344144949
357379274
486003277
37822661
101332372
331719055
15443529
488869542
15663236
54189937
41645835
19387441
4937347
607944061
1434664
256028234
135259832
569834080
594068236
106456356
199842261
677664518
299615485
268352133
661...

result:

ok 100000 numbers