QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#855968#1402. Collecting StampsGGapaggl100 ✓61ms38544kbC++141.0kb2025-01-13 13:56:332025-01-13 13:56:35

Judging History

你现在查看的是最新测评结果

  • [2025-01-13 13:56:35]
  • 评测
  • 测评结果:100
  • 用时:61ms
  • 内存:38544kb
  • [2025-01-13 13:56:33]
  • 提交

answer

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = (a), stOwrh = (b); i <= stOwrh; i++)
#define per(i, a, b) for(int i = (a), stOwrh = (b); i >= stOwrh; i--)
using namespace std;
using LL = long long;
using VI = vector<int>;

template <typename T>
constexpr void chkmin(T &x, const T &y) {x = min(x, y); }

constexpr int INF = 1e9;

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n, t; cin >> n >> t;
    vector<VI> F(n + 2, VI(n + 2, INF));
	F[0][0] = 0;
	for(int i = 1, u, v, d, e; i <= n; i++) {
		cin >> u >> v >> d >> e;
		rep(j, 1, n) if(F[i - 1][j] < INF) F[i - 1][j] += 2 * j * t;
		rep(j, 0, n) chkmin(F[i][j], F[i - 1][j] + u + v);
		rep(j, 1, n) chkmin(F[i][j], F[i - 1][j] + d + e);
		rep(j, 1, n) chkmin(F[i][j], F[i - 1][j - 1] + d + v);
		rep(j, 0, n - 1) chkmin(F[i][j], F[i - 1][j + 1] + u + e);
		rep(j, 1, n) chkmin(F[i][j], F[i][j - 1] + d + v);
		per(j, n - 1, 0) chkmin(F[i][j], F[i][j + 1] + u + e);
	}
    cout << F[n][0] + t * (n + 1) << '\n';
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

6 26952
456 8932 44227 83450
47172 34323 46403 81486
38476 27874 86584 14850
19570 55277 29386 12706
89353 66883 96624 39456
77652 52403 2705 97257

output:

707035

result:

ok single line: '707035'

Test #2:

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

input:

1 44376
32544 57861 53410 78637

output:

179157

result:

ok single line: '179157'

Test #3:

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

input:

16 37868
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 1000...

output:

3843756

result:

ok single line: '3843756'

Test #4:

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

input:

14 26741
62194 8771 35315 29399
71451 11676 72059 70758
82199 76073 44032 4174
79816 25510 40462 22759
90160 72180 18076 79463
87252 38669 57982 72594
52517 42782 79302 25106
67050 78833 70518 82297
28857 96566 31903 20919
75453 99198 56674 55318
88285 67242 23954 54907
68427 25651 71212 19643
87548...

output:

2068897

result:

ok single line: '2068897'

Test #5:

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

input:

16 32313
49420 4852 91218 42290
43991 55228 55719 87569
68067 80718 63911 34641
67092 57938 73899 95813
71789 62041 67880 9699
15072 19799 17285 43308
33378 57275 43164 78525
78933 817 84491 6656
3634 1455 35661 95922
1979 95360 78988 71508
15756 32444 76147 15099
44407 83506 80321 30065
26298 34369...

output:

1981846

result:

ok single line: '1981846'

Test #6:

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

input:

13 32369
13329 57702 29509 12612
21313 17351 52289 34735
75382 5670 77232 97600
98253 646 92413 56591
76384 86827 30395 27608
62465 9985 96169 52256
45635 73893 91199 234
97268 86887 2030 84546
3978 54517 96439 76650
47911 80573 90935 71179
66397 13691 89942 32936
30761 13401 21666 40571
92219 107 1...

output:

1677023

result:

ok single line: '1677023'

Test #7:

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

input:

14 12821
24074 53174 73708 53216
70586 78996 67185 82324
83875 3031 58676 49653
18419 48430 47885 14124
231 71130 99007 30809
29830 82439 21494 70900
72252 83793 4609 51386
82560 69874 60154 92259
87640 78105 2912 35056
35241 35967 91333 62881
8613 52870 29242 2380
70980 68177 43446 79606
50308 8656...

output:

1519373

result:

ok single line: '1519373'

Test #8:

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

input:

15 22036
98930 5969 56449 24452
5047 90450 60163 94897
2229 9006 99869 52156
20315 79200 96633 11091
44320 3100 24466 60309
54196 98749 85098 29992
48814 447 14050 44450
55534 88581 12457 60179
67392 19412 382 75099
62670 82345 39485 51282
75404 7727 25745 18333
53341 23687 28286 84826
44371 89740 5...

output:

1520973

result:

ok single line: '1520973'

Test #9:

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

input:

16 81062
4275 39707 55741 49807
76992 33721 1016 87786
36017 33966 25639 49048
97014 30104 35750 90433
2636 19139 78024 78457
8790 47809 4183 41209
54759 43461 57278 4761
40240 13666 32019 11407
47278 39577 43639 61405
63217 6689 94647 39853
81022 30346 30823 30938
14012 6478 71523 72889
8329 24555 ...

output:

2486730

result:

ok single line: '2486730'

Test #10:

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

input:

16 16251
79650 67369 80948 12271
97190 47030 93892 43892
60039 93171 7992 40781
4927 71684 26834 39897
39463 17845 20125 36292
63695 52233 16756 64263
36100 70233 65719 2905
3305 81725 24162 6636
69546 64878 26598 45542
22273 36621 8649 87019
12888 507 81768 92177
65467 58235 81840 86117
30966 19387...

output:

1714380

result:

ok single line: '1714380'

Test #11:

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

input:

16 47424
1552 7538 80743 50255
9613 8346 90729 85261
3144 6506 62995 62219
3241 3877 76273 82859
8390 5504 76287 55678
4804 4749 69457 67129
1631 5076 97063 97614
5748 8290 60923 98954
7436 1441 82709 97565
2342 179 54597 85538
785 5676 70002 88178
9228 9702 83541 67358
5593 8612 92849 69594
8445 81...

output:

972017

result:

ok single line: '972017'

Test #12:

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

input:

16 59774
2605 1435 76134 89331
4295 9459 68684 71627
4475 4691 52960 72885
2755 241 90634 74853
403 7438 83206 66999
6123 8812 68893 95381
5638 1247 88511 85611
4741 6191 89950 57716
3859 1944 50610 65988
1136 3863 50170 72823
3721 2908 89072 94295
5792 8735 93514 91420
7855 2099 78224 87468
8798 69...

output:

1166267

result:

ok single line: '1166267'

Test #13:

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

input:

16 19
98445 1 1 98944
1 93922 99317 1
1 99873 99883 1
1 98079 99873 1
1 97118 99277 1
1 94996 99774 1
1 96774 99309 1
1 94924 99314 1
1 93932 99856 1
1 94824 99977 1
1 95321 99424 1
1 98020 99964 1
1 94377 99352 1
1 96500 99773 1
1 95429 99601 1
1 99108 99309 1

output:

4943

result:

ok single line: '4943'

Subtask #2:

score: 75
Accepted

Dependency #1:

100%
Accepted

Test #14:

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

input:

92 31045
76242 14942 18112 95047
54156 66141 35839 64591
96272 26741 51152 55855
86187 28879 91090 73845
19834 12121 76089 82164
64701 44610 77813 5798
23190 90146 77694 41918
78382 41804 21515 81483
80954 9818 79367 35259
97325 50719 50799 17367
66809 51871 34875 63348
27941 49457 11897 80818
76454...

output:

11718252

result:

ok single line: '11718252'

Test #15:

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

input:

1 68900
98723 28289 33530 28933

output:

264812

result:

ok single line: '264812'

Test #16:

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

input:

100 2035
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 1000...

output:

20205535

result:

ok single line: '20205535'

Test #17:

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

input:

8 55010
50446 34132 57459 65254
97247 73384 64954 56215
1534 55592 46416 41012
1895 29254 17238 34181
85940 1059 3028 32327
89526 47865 98625 16177
7903 51815 95464 13865
86119 89659 50366 73500

output:

1293880

result:

ok single line: '1293880'

Test #18:

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

input:

27 31672
33765 51171 31530 30174
17447 4581 69123 63615
33711 84934 35068 94861
27057 23407 2349 60523
8052 67554 90208 49397
97409 61722 71870 46845
91065 60868 29114 89335
64500 34846 48696 84333
77182 54593 80761 36385
98765 85467 94410 85763
43941 99814 57556 16280
9178 85932 37305 26310
62067 9...

output:

3650216

result:

ok single line: '3650216'

Test #19:

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

input:

57 80310
84808 12757 59958 23291
76428 55221 29949 74156
41015 71018 84208 11008
73899 81765 74611 24457
95698 48302 95904 83945
85434 96302 45284 22497
64053 68113 64593 66073
56230 32887 54652 60785
6515 23982 58494 81307
23139 80251 46678 40331
59445 86602 59752 11188
8107 13446 10029 95790
50456...

output:

10405242

result:

ok single line: '10405242'

Test #20:

score: 75
Accepted
time: 1ms
memory: 3572kb

input:

89 31189
70383 11182 82326 6021
72046 42992 42794 27215
50771 39570 47943 53697
64188 20841 62801 77356
11127 17211 86550 49030
10984 72963 56904 98283
55605 4632 75933 73934
34810 43009 85009 44353
64730 58308 92518 28411
10404 62526 32496 10503
90693 35061 56338 14011
93658 21881 19086 91333
86867...

output:

11213171

result:

ok single line: '11213171'

Test #21:

score: 75
Accepted
time: 1ms
memory: 3760kb

input:

97 69793
82279 30644 71870 78005
45806 14143 56210 59913
75975 96702 80511 57028
89108 88829 33273 62551
450 10025 31987 33148
39652 89372 91349 66642
80060 11864 29341 88073
19533 39231 33315 22979
20595 12730 50870 90243
11146 61903 28618 88019
8404 62981 93286 95813
32545 12983 61559 16102
79592 ...

output:

16233290

result:

ok single line: '16233290'

Test #22:

score: 75
Accepted
time: 1ms
memory: 3592kb

input:

98 73176
90967 73646 49226 24141
66469 57178 61402 38356
64117 16763 78799 89477
84507 75043 32244 34386
99249 4303 55164 84667
69949 17565 77691 94157
61021 10435 71361 67516
35397 43981 49284 86591
78467 56660 93292 79136
95533 14546 57205 94160
75912 14118 38589 59383
37963 36836 44569 61127
2911...

output:

17027958

result:

ok single line: '17027958'

Test #23:

score: 75
Accepted
time: 1ms
memory: 3836kb

input:

99 66336
26191 7073 67274 34313
88004 78955 44709 54968
38382 12558 6076 98571
39881 47813 36308 93286
35415 22061 83376 94693
86178 26279 91380 23036
3418 28958 99755 82823
62621 68739 959 35883
86221 60380 97834 16298
51457 6640 61152 92865
78690 96064 36849 5054
55104 6879 44130 64917
45146 31153...

output:

16175321

result:

ok single line: '16175321'

Test #24:

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

input:

100 43180
61456 45360 2020 96519
96655 52868 88649 63709
60269 9131 61028 63662
42846 44351 9214 37082
40011 82102 18680 93028
59984 50704 43687 20006
5052 82292 3669 97966
7479 12013 88890 1698
54474 90931 76402 97422
63634 83049 56465 35562
91359 20398 99707 41206
61076 99320 67029 32679
91585 539...

output:

14196123

result:

ok single line: '14196123'

Test #25:

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

input:

100 71182
20129 42015 79974 45538
71923 35902 86997 14868
4630 42485 18847 47899
83568 31616 9318 52256
56795 26241 86013 78160
48446 56184 25276 30735
60743 27432 5372 21695
68545 49965 39544 90401
3388 83139 84493 75898
17793 34258 78540 60828
27825 79035 51510 46911
9905 72583 98 39646
87631 5104...

output:

16757751

result:

ok single line: '16757751'

Test #26:

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

input:

100 5857
6332 8955 56317 85372
5404 3898 54173 97239
7397 4102 97493 81097
1245 8058 80408 84080
3418 5943 81929 83199
433 8238 90124 74749
6373 8442 90210 78271
2775 1499 75100 50951
5486 1147 98355 74877
9215 2280 93468 86549
5579 3163 77056 87150
9201 897 92832 97434
8061 8058 77835 57315
2602 37...

output:

1596960

result:

ok single line: '1596960'

Test #27:

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

input:

100 64417
7808 7001 73169 67255
3222 3212 99586 99211
823 3548 51036 70515
2875 1169 85901 78181
2733 6317 58007 55545
2976 2401 63563 54051
2822 9168 51780 81092
5175 5715 70251 52375
1377 994 64649 57745
230 2243 50965 90455
6441 883 59897 95277
3436 3409 56663 96880
4161 8707 86630 55970
7276 300...

output:

7486346

result:

ok single line: '7486346'

Test #28:

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

input:

100 1
99411 1 1 99038
1 94695 99579 1
1 98036 99818 1
1 94417 99456 1
1 98058 99475 1
1 94229 99468 1
1 97694 99628 1
1 96872 99924 1
1 95912 99386 1
1 95653 99618 1
1 94631 99793 1
1 97306 99977 1
1 99172 99225 1
1 98791 99189 1
1 97527 99529 1
1 94682 99464 1
1 98661 99961 1
1 96215 99388 1
1 9395...

output:

10397

result:

ok single line: '10397'

Test #29:

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

input:

100 12
1 91683 96541 1
91215 1 1 98895
1 99986 96408 1
1 96600 92864 1
1 92471 95698 1
1 90628 94744 1
99719 1 1 91520
1 90160 92297 1
1 94645 92583 1
1 95519 95569 1
1 99352 99650 1
1 91616 92254 1
1 94675 96512 1
1 97647 98985 1
94848 1 1 95760
1 98821 98040 1
1 96215 96601 1
1 94134 96923 1
1 901...

output:

181912

result:

ok single line: '181912'

Subtask #3:

score: 15
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #30:

score: 15
Accepted
time: 58ms
memory: 38480kb

input:

2996 91249
65137 52285 86493 6242
54064 75407 455 24239
4369 52249 13656 18346
95455 57329 7163 11962
23719 11281 66676 41426
7824 28259 80542 47401
53226 34558 21172 76541
86264 1561 13989 61985
28482 22147 88964 17036
79001 94671 61734 46677
2062 85948 59700 62983
46617 274 17415 69199
9961 41346 ...

output:

573711795

result:

ok single line: '573711795'

Test #31:

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

input:

1 70209
26791 90620 37038 13992

output:

257829

result:

ok single line: '257829'

Test #32:

score: 15
Accepted
time: 58ms
memory: 38448kb

input:

3000 38723
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 100000 100000 100000
100000 10...

output:

716207723

result:

ok single line: '716207723'

Test #33:

score: 15
Accepted
time: 45ms
memory: 30512kb

input:

2646 52158
50481 38159 98798 42283
24123 30715 95610 80713
43698 22768 53390 47030
48251 56353 4236 20986
60426 64258 49991 70030
64202 10035 74639 79361
28663 99061 24013 89998
54322 62674 94636 38547
2526 83478 43706 93229
41951 41734 71973 56446
13838 42837 27687 38759
15114 13819 56228 29821
435...

output:

400902627

result:

ok single line: '400902627'

Test #34:

score: 15
Accepted
time: 34ms
memory: 24128kb

input:

2322 34572
88336 5752 78831 3912
95924 78529 82245 31169
16137 58037 44536 76136
2031 13849 51879 62878
28121 14670 98202 16288
61711 54720 92119 20265
15493 60195 55152 19069
30195 97300 45126 93776
94363 97359 34779 96806
56662 81333 3489 59772
59440 3873 99677 77563
54084 34531 87435 39854
79185 ...

output:

306606601

result:

ok single line: '306606601'

Test #35:

score: 15
Accepted
time: 14ms
memory: 11992kb

input:

1508 1
43456 75555 42438 54727
29287 35695 94291 61773
15699 44626 19120 43298
74557 41169 44044 2476
83898 47061 46175 73665
99909 54381 7824 7400
47593 85016 35413 96871
26642 38264 78741 10767
20478 88415 20190 12788
46813 12566 26999 20874
44070 40541 97851 80076
86177 3319 8876 25418
50208 4378...

output:

99269205

result:

ok single line: '99269205'

Test #36:

score: 15
Accepted
time: 7ms
memory: 8368kb

input:

1148 817
46413 53381 15424 61866
99453 46856 45409 6616
85175 5551 83604 31256
21957 51317 94440 19855
66730 297 78650 74833
3587 32850 75052 5334
98887 6647 35680 47107
54919 69906 35231 93027
4119 69637 12426 8382
32597 9433 80195 85060
76268 96976 78188 4626
66439 92461 47276 49551
65335 67737 62...

output:

80531812

result:

ok single line: '80531812'

Test #37:

score: 15
Accepted
time: 60ms
memory: 38380kb

input:

2997 46354
28339 30919 64563 59768
20353 72236 71411 86407
16803 88175 3538 88597
45214 98901 31259 60197
19092 64610 53528 51588
28705 10112 12900 1540
30098 96819 36187 26236
98585 12832 16884 3241
24817 32115 68006 87287
55794 2946 81379 25137
32167 7952 90092 28167
86316 81330 49879 74329
94278 ...

output:

435941799

result:

ok single line: '435941799'

Test #38:

score: 15
Accepted
time: 60ms
memory: 38536kb

input:

2998 5
60169 15053 86133 85224
73148 73606 95068 90160
9965 28108 29305 36685
4062 23974 57201 16951
64011 63726 97338 65934
42127 5625 78585 90644
15110 36386 92773 5281
25637 65039 64271 6573
56017 74615 34465 34746
1361 26442 13756 92717
57618 794 34827 71868
52974 74490 7451 79510
54838 83771 61...

output:

198946517

result:

ok single line: '198946517'

Test #39:

score: 15
Accepted
time: 57ms
memory: 38464kb

input:

2999 91571
63089 6078 39453 25123
2936 99377 83290 25424
79463 58405 12304 7515
23155 85617 15516 97260
23148 38068 28787 30556
60078 28936 96662 74293
34559 15754 86511 99427
47138 91984 58381 60133
44653 66580 21957 37150
67177 3591 14701 19515
96037 68714 82118 14489
90779 26996 90547 36989
47906...

output:

573921276

result:

ok single line: '573921276'

Test #40:

score: 15
Accepted
time: 53ms
memory: 38464kb

input:

3000 558
46830 62826 33362 49493
8536 52431 30279 22466
60875 63802 37834 8827
95097 11550 21966 393
47300 81277 62107 95762
71947 21085 24839 57528
7267 73290 41124 95371
24126 46850 69857 56744
42754 52328 44147 13405
18048 64583 45719 69918
59597 15706 93827 18524
87679 13881 15989 41159
65584 23...

output:

207360740

result:

ok single line: '207360740'

Test #41:

score: 15
Accepted
time: 58ms
memory: 38436kb

input:

3000 1
46830 48350 48966 4867
33595 4181 87470 64552
24404 46839 45260 63044
56189 98900 67245 35130
11441 25744 83762 20837
70762 41222 71342 58901
93624 68707 1125 58442
60049 12046 96915 23939
81219 13330 1571 20500
3758 50165 66979 78042
5833 42455 49588 68349
18333 42369 78780 1410
55209 14375 ...

output:

200582073

result:

ok single line: '200582073'

Test #42:

score: 15
Accepted
time: 57ms
memory: 38544kb

input:

3000 5
2143 7138 70694 53926
3038 3770 96531 51379
7431 9761 52355 73323
4028 6330 67521 86738
4820 6674 64712 69359
4116 5618 57299 97722
6018 1858 83950 74666
6350 7569 72795 91507
9643 7321 97255 70196
3488 6208 65487 99626
9374 1858 59518 91352
6167 8947 64435 64116
7280 2637 58241 65219
8003 81...

output:

30160742

result:

ok single line: '30160742'

Test #43:

score: 15
Accepted
time: 60ms
memory: 38464kb

input:

3000 94950
6724 2656 81485 58084
4224 2582 94435 70559
4016 6941 69971 95920
3703 1447 85645 54911
2520 8070 78882 62534
869 5269 62167 82516
7672 9469 76708 70936
5769 1069 79362 96101
7570 2544 58986 58819
4067 638 54024 60235
7473 3033 82663 76480
1633 3046 89529 91982
1203 3573 79181 70608
6422 ...

output:

314812788

result:

ok single line: '314812788'

Test #44:

score: 15
Accepted
time: 56ms
memory: 38452kb

input:

3000 12
99129 1 1 99008
1 96290 99560 1
1 95499 99840 1
1 96946 99898 1
1 96153 99954 1
1 94889 99634 1
1 99734 99576 1
1 96027 99498 1
1 94215 99675 1
1 97055 99883 1
1 94978 99443 1
1 98185 99486 1
1 98165 99184 1
1 95732 99533 1
1 99253 99601 1
1 95748 99788 1
1 97615 99679 1
1 95033 99722 1
1 98...

output:

108012008

result:

ok single line: '108012008'

Test #45:

score: 15
Accepted
time: 57ms
memory: 38436kb

input:

3000 13
1 97271 92629 1
91753 1 1 95879
1 93290 98403 1
1 91987 90614 1
1 98629 98484 1
92506 1 1 93851
1 93957 93900 1
1 90435 98127 1
1 98212 95757 1
1 91239 98250 1
1 92159 97386 1
1 90078 94780 1
1 97118 95901 1
1 92370 93685 1
1 90653 96505 1
1 97648 90546 1
1 91045 97321 1
1 91518 95529 1
1 91...

output:

115557615

result:

ok single line: '115557615'

Test #46:

score: 15
Accepted
time: 61ms
memory: 38524kb

input:

3000 17
1 93735 94342 1
92582 1 1 93624
1 96232 93411 1
1 93113 93234 1
1 94874 96354 1
1 94479 94777 1
1 98154 91325 1
1 97043 99971 1
91779 1 1 96147
1 95303 91279 1
1 97678 93371 1
1 95153 95685 1
1 90060 99523 1
1 96388 90939 1
1 93039 97514 1
1 92596 95846 1
93931 1 1 98774
1 93474 91162 1
1 91...

output:

150366885

result:

ok single line: '150366885'

Extra Test:

score: 0
Extra Test Passed