QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#343357 | #8006. Dinosaur Bones Digging | ucup-team1525# | AC ✓ | 1526ms | 26232kb | C++17 | 3.9kb | 2024-03-02 14:23:59 | 2024-03-02 14:24:00 |
Judging History
answer
#include <bits/stdc++.h>
struct Seg {
int l, r;
};
struct CmpL {
bool operator()(const Seg& a, const Seg& b) const { return a.l < b.l; }
};
struct CmpR {
bool operator()(const Seg& a, const Seg& b) const { return a.r < b.r; }
};
struct CmpLR {
bool operator()(const Seg& a, const Seg& b) const {
if (a.l != b.l) { return a.l < b.l; }
return a.r < b.r;
}
};
const int N = 1e6 + 10;
struct Point {
int p, x;
};
struct CmpX {
bool operator()(const Point& a, const Point& b) const { return a.x < b.x; }
};
std::vector<Point> a;
std::vector<Seg> v;
void Input() {
std::ios::sync_with_stdio(false);
int n;
std::cin >> n;
for (int i = 1; i <= n; i++) {
int x;
std::cin >> x;
a.push_back((Point){i, x});
}
std::sort(a.begin(), a.end(), CmpX());
std::reverse(a.begin(), a.end());
int m;
std::cin >> m;
std::vector<Seg> w(m);
for (auto& [l, r]: w) {
std::cin >> l >> r;
}
std::sort(w.begin(), w.end(), CmpLR());
for (const auto& s: w) {
if (!v.empty()) {
auto vb = v.back();
if (vb.r >= s.r) { continue; }
if (vb.l == s.l && vb.r <= s.r) { v.pop_back(); }
}
v.push_back(s);
}
}
namespace ST {
int son[N][2];
int v[N], lazy[N];
int nodeCount;
void SolveLazy(int t) {
int l = lazy[t];
lazy[t] = 0;
if (l == 0) { return; }
v[t] += l;
if (son[t][0] == 0) { return;}
lazy[son[t][0]] += l;
lazy[son[t][1]] += l;
}
void Refresh(int t) {
SolveLazy(son[t][0]);
SolveLazy(son[t][1]);
v[t] = std::max(v[son[t][0]], v[son[t][1]]);
}
void Update(int t, int l, int r, int x, int L, int R) {
if (l == L && r == R) {
lazy[t] += x;
return;
}
SolveLazy(t);
int mm = L + (R - L) / 2;
if (r <= mm) {
Update(son[t][0], l, r, x, L, mm);
} else if (l > mm) {
Update(son[t][1], l, r, x, mm + 1, R);
} else {
Update(son[t][0], l, mm, x, L, mm);
Update(son[t][1], mm + 1, r, x, mm + 1, R);
}
Refresh(t);
}
int QueryMax(int t, int l, int r, int L, int R) {
SolveLazy(t);
if (l == L && r == R) { return v[t]; }
int mm = L + (R - L) / 2;
if (r <= mm) { return QueryMax(son[t][0], l, r, L, mm); }
if (l > mm) { return QueryMax(son[t][1], l, r, mm + 1, R); }
return std::max(
QueryMax(son[t][0], l, mm, L, mm),
QueryMax(son[t][1], mm + 1, r, mm + 1, R)
);
}
int Build(int L, int R) {
int t = ++nodeCount;
if (L == R) { return t; }
int mm = L + (R - L) / 2;
son[t][0] = Build(L, mm);
son[t][1] = Build(mm + 1, R);
return t;
}
}
int GetL(int p) {
auto it = std::lower_bound(v.begin(), v.end(), (Seg) {p,p}, CmpR());
return it - v.begin();
}
int GetR(int p) {
auto it = std::upper_bound(v.begin(), v.end(), (Seg) {p,p}, CmpL());
if (it == v.begin()) { return -1; }
return it - v.begin() - 1;
}
using ll = long long;
void Solve() {
int L = 0, R = v.size() - 1;
int t = 1;
ST::Build(L, R);
ll ans = 0;
for (auto [p, x]: a) {
int l = GetL(p);
int r = GetR(p);
if (l > r) { continue; }
// std::cout << p << " ";
// std::cout << x << " ";
// std::cout << l << " ";
// std::cout << r << std::endl;
int count = ST::QueryMax(1, l, r, L, R);
ans = std::max(ans, 1ll * x * count);
ST::Update(1, l, r, 1, L, R);
}
std::cout << ans << std::endl;
}
int main() {
Input();
Solve();
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5596kb
input:
6 3 5 2 7 4 6 2 1 5 3 6
output:
9
result:
ok answer is '9'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
1 100 1 1 1
output:
0
result:
ok answer is '0'
Test #3:
score: 0
Accepted
time: 1ms
memory: 5592kb
input:
20 451541695 690066663 673479208 448269517 560111835 982439295 929007403 955125568 735150915 829197546 256554877 435297385 348361716 763574893 202875223 881879899 590527232 256896900 31383620 400212120 5 4 8 4 17 11 13 19 20 17 18
output:
4480894680
result:
ok answer is '4480894680'
Test #4:
score: 0
Accepted
time: 1ms
memory: 5592kb
input:
100 310791482 148245051 114541081 918781914 681485137 656214017 226939378 970492592 431199764 162399115 490488808 3059986 487892489 611730708 952388887 418021477 917893766 587279310 363995315 342188612 72531000 156997725 896382592 359419647 144773021 872005978 496280920 65840663 56171913 273988049 6...
output:
23457460782
result:
ok answer is '23457460782'
Test #5:
score: 0
Accepted
time: 1ms
memory: 5580kb
input:
1000 653152089 378327983 557774751 390757038 4471201 856292034 205122039 30258841 396640873 159207453 703775065 793745674 681241216 876218560 582247644 205933914 957242345 112988670 939157518 525653622 262606938 993539583 451620719 700727137 142726078 430071359 426031860 471766448 94089907 167433741...
output:
242077104830
result:
ok answer is '242077104830'
Test #6:
score: 0
Accepted
time: 4ms
memory: 5768kb
input:
10000 760845880 236665988 765352292 817854026 789863420 399953246 270535243 932350041 48814223 670950468 456660682 416165008 999681497 666880584 56581573 134567049 403285848 144814129 973325555 23519957 518449311 738687225 345716065 2309498 477743569 555951695 911860717 920761968 569179690 349857557...
output:
2452630249040
result:
ok answer is '2452630249040'
Test #7:
score: 0
Accepted
time: 201ms
memory: 11600kb
input:
75000 64097076 228795807 236402963 795983877 911904460 793466611 195874572 123239434 599032119 741932 916254858 335612220 445268867 659313703 848780671 12116264 105543333 438293575 879273474 875134498 618135541 308227823 220867277 683811264 720576432 874505737 896095678 437505375 945318773 658945922...
output:
18740230889380
result:
ok answer is '18740230889380'
Test #8:
score: 0
Accepted
time: 203ms
memory: 11860kb
input:
100000 237252794 382693085 295147362 674980341 2958154 807156999 970437955 781426294 772360469 332498984 366981282 102374212 992836938 434644540 742598545 821844749 65037055 208304069 38844999 893543237 392739243 968841288 483750814 102524579 991416234 875749582 237552019 633704354 706506941 8051497...
output:
24967271468601
result:
ok answer is '24967271468601'
Test #9:
score: 0
Accepted
time: 30ms
memory: 6324kb
input:
100000 38413036 456923902 821971466 586909482 636298728 158178471 84422915 632002470 34405999 882453211 922025994 294603996 207311349 526030511 417456448 362917277 456078308 435018316 47342069 47738636 642863127 189926256 40263985 58857249 119358305 864464366 83617839 485428518 305918980 942395945 6...
output:
24903646283538
result:
ok answer is '24903646283538'
Test #10:
score: 0
Accepted
time: 61ms
memory: 7072kb
input:
193531 700185685 653403475 398038439 272114589 644859446 234924539 412364196 347296552 436428000 711722981 547258844 794359236 961133698 639407426 480555752 954373403 653187777 339413210 11632662 145811119 988611894 708168836 83399147 696410193 214277102 445328303 392328860 390290603 283682280 54718...
output:
48119967363993
result:
ok answer is '48119967363993'
Test #11:
score: 0
Accepted
time: 44ms
memory: 7428kb
input:
200000 946595722 271213712 915506504 843189857 889214784 150802916 47950504 875914997 813247785 35791160 36350165 271403304 553268056 642299504 824405101 760788345 582500756 810890307 844167937 517445752 954178007 539167422 956565909 640348492 772207312 776135104 355220770 409647150 406776930 754956...
output:
49398629253632
result:
ok answer is '49398629253632'
Test #12:
score: 0
Accepted
time: 64ms
memory: 7804kb
input:
200000 474676011 939912865 348389405 320057032 401730779 772694363 522559450 449397650 84577374 772638546 454036490 511546084 450152378 361510375 736170896 868337032 233134669 593272303 521368545 910823164 807700292 524313138 209216902 471719411 93601829 139239405 320779934 441796820 979537222 16444...
output:
49741688559332
result:
ok answer is '49741688559332'
Test #13:
score: 0
Accepted
time: 66ms
memory: 7072kb
input:
200000 109397543 143192033 948668698 815492316 724901105 620108314 698967424 360842287 755198103 180096873 94781007 498090054 977844902 23263014 766839886 91213121 401300673 360200922 31701400 481563828 71448349 278872261 492714526 983119401 499513604 154303065 208383011 942154652 116109138 50732665...
output:
49786042407145
result:
ok answer is '49786042407145'
Test #14:
score: 0
Accepted
time: 227ms
memory: 12696kb
input:
200000 261992073 430909777 926146925 252251819 677218593 568716743 908238045 661028536 139554984 409946901 500485900 106878666 866267660 873908781 889662294 441992527 580144564 430178452 766191560 763853446 251057656 399523045 657208230 289791746 758935460 495002956 936637415 295647787 117309049 752...
output:
49900955205738
result:
ok answer is '49900955205738'
Test #15:
score: 0
Accepted
time: 101ms
memory: 10064kb
input:
500000 543196303 520001257 135913319 141681743 72855073 102021396 17954772 995707282 533540003 144014914 804630833 49605709 207753044 457005411 880119304 425402060 566315173 703211964 652934484 672802538 674426047 85342051 819455751 579118746 150110202 364244420 947318917 16739938 751932263 60777782...
output:
124534814723946
result:
ok answer is '124534814723946'
Test #16:
score: 0
Accepted
time: 110ms
memory: 10660kb
input:
500000 971792225 794146129 785511712 194135736 44786844 284152939 194083613 817410592 373146814 22622070 711767340 635823706 921756845 722623917 642611556 926642211 92896466 995135854 734765984 941700506 602652059 987869882 834639871 519669444 336528375 96478137 76254564 60733961 164313053 748831540...
output:
124240327455168
result:
ok answer is '124240327455168'
Test #17:
score: 0
Accepted
time: 221ms
memory: 13920kb
input:
1000000 129069570 702294568 125097641 447480588 218836298 281325716 362050097 11943415 717507041 299560656 434156157 308361506 374777194 802395549 673723185 424560671 314086825 759987836 872157780 803022722 656075017 128973367 589636307 233569636 120180505 318294358 777728766 964983779 323489034 471...
output:
249813673995070
result:
ok answer is '249813673995070'
Test #18:
score: 0
Accepted
time: 227ms
memory: 15616kb
input:
1000000 281228710 985743097 719261722 552388573 897858624 645588802 714307780 510125843 246977559 766326585 543396467 190349116 653041693 598473776 903740393 572265166 927057923 343835616 770979563 225720546 217559745 929510118 474780354 824222648 347792658 927985985 890375867 612780336 853283317 19...
output:
249986866979625
result:
ok answer is '249986866979625'
Test #19:
score: 0
Accepted
time: 282ms
memory: 17000kb
input:
1000000 578612043 564158922 18458508 802520750 136689461 450043377 771598167 448499760 221158478 528059809 92828265 512528215 931306192 539776195 573949090 719969661 394804829 632716100 934642563 208226883 484077177 879789973 214700209 709842955 15596299 537677612 297990264 700768381 528301792 33505...
output:
249189618339640
result:
ok answer is '249189618339640'
Test #20:
score: 0
Accepted
time: 365ms
memory: 19052kb
input:
1000000 263709877 249145493 400170549 868915888 960002504 272680394 425758139 683024665 544365499 455242644 229535590 115994789 932297247 13518365 684834337 895852392 202945750 509480961 234126953 296485671 284011673 437262033 105473744 332199902 773743475 411091856 764394619 98779195 374616388 3310...
output:
249839772035172
result:
ok answer is '249839772035172'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
30 499096833 933417495 882103125 787425402 648972887 700946219 839122735 37379635 486445119 773907603 874486646 797822652 717107686 406388292 751203987 283378903 299862157 797984363 883292224 626917047 37657097 1815525 504484877 101245061 932308294 263386821 768674270 511612127 460995775 145889490 1...
output:
6489728870
result:
ok answer is '6489728870'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
200 34354700 862581412 59106770 676268610 653416907 983569753 403068219 792195902 270806575 41006271 692592611 884245279 201896291 582381918 565138036 64485820 4283571 879203200 591051007 906053877 705789716 764558261 766342520 154746153 331191193 309272399 920183863 109834686 613776895 710009063 36...
output:
31837335420
result:
ok answer is '31837335420'
Test #23:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
1000 268499703 957112864 455900330 100247751 404796282 488787131 505894877 758603162 232359976 974696772 939286817 343845003 213739473 21884711 890858141 963344620 749244311 485404222 838987281 61567940 263295859 176714075 432430926 830176845 20946608 329581250 520460985 432801398 261834350 34105207...
output:
121840338190
result:
ok answer is '121840338190'
Test #24:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
1000 700543916 173893013 580621135 886721124 484812637 686502044 872697499 731469794 607847992 690178016 646398170 33467773 211272946 784751438 523215447 423995211 383516946 544620997 335599991 267566999 85960564 107995035 827605805 617042784 826857671 661388057 188738435 988060375 17520655 11584281...
output:
126448553496
result:
ok answer is '126448553496'
Test #25:
score: 0
Accepted
time: 83ms
memory: 5404kb
input:
100000 935860805 985130033 782895781 739086796 859970843 504969873 982451813 339193953 830829630 960098998 479744296 32119815 336992875 584329585 21227100 413370515 253619426 879496633 736806966 888735291 778873833 229331239 929308203 742474269 799800137 23697530 170099575 333815481 559003343 660053...
output:
12435736939200
result:
ok answer is '12435736939200'
Test #26:
score: 0
Accepted
time: 113ms
memory: 5356kb
input:
157000 829866708 578710232 578289776 318538299 852913519 750677882 671283794 150002526 202571035 711505399 600531693 723375332 382097903 274922450 440273782 830226754 632134243 635449230 98899400 98846765 607974353 501804853 603503841 446897953 212568315 695165652 255658851 878141405 670359172 19477...
output:
19617637311024
result:
ok answer is '19617637311024'
Test #27:
score: 0
Accepted
time: 174ms
memory: 6504kb
input:
197000 117046507 294174572 130091424 361455370 367089920 175915150 104474173 300684917 324943689 141992180 1303636 455340314 433441682 747082801 558418241 85409130 630572010 154613176 76532966 286208507 725546275 39249761 342927912 676962313 289520982 815485928 655188848 493362160 623950940 54884798...
output:
24898591988536
result:
ok answer is '24898591988536'
Test #28:
score: 0
Accepted
time: 170ms
memory: 6492kb
input:
200000 775306878 714902016 126079769 960020951 847307730 884263017 744011557 571961339 150623360 477036617 557192213 315367538 196273137 457760307 315267149 705658455 873767204 394604142 958681349 911049148 649184041 237392756 509733064 766188582 692100007 936440949 344642549 178125068 220946776 775...
output:
25134733192140
result:
ok answer is '25134733192140'
Test #29:
score: 0
Accepted
time: 190ms
memory: 7456kb
input:
200000 904155963 520185740 644847155 871575325 294374731 94048298 312952828 854807693 991472846 104974095 592796905 250622749 947536108 810893755 13747453 386408887 25867296 584537378 854973132 915808764 723384507 244659758 345117185 987241148 543173984 759549498 371921370 653964927 448507270 511163...
output:
24907953621600
result:
ok answer is '24907953621600'
Test #30:
score: 0
Accepted
time: 208ms
memory: 8348kb
input:
200000 82253775 74881293 974408974 185548232 977618871 747230613 838457259 513295411 555444324 768452128 406841946 620197031 206915751 174102045 598672109 798693990 652148599 732556222 261949854 75254709 578641517 383254139 978007432 113285725 65814089 478334863 201035051 643213356 414742891 2196578...
output:
25142799477915
result:
ok answer is '25142799477915'
Test #31:
score: 0
Accepted
time: 730ms
memory: 11820kb
input:
1000000 216033365 58812309 877175367 80779196 549402777 529469759 154173178 815040512 65512323 390897758 146254891 85816775 467251072 363741329 766596244 888359178 538936884 435698637 304504672 188841814 971643126 792914649 458216623 173404750 732388175 634068432 606065688 141715495 368585599 445602...
output:
125139613420027
result:
ok answer is '125139613420027'
Test #32:
score: 0
Accepted
time: 886ms
memory: 13472kb
input:
1000000 586636667 11587116 944315485 844109983 758939094 607238415 447975208 239224537 172619489 586879836 897455253 484608716 645580748 523789893 600100926 500830499 622594365 312372624 743016562 84017245 886848971 415570966 252504755 214454095 174699652 246216260 410474553 5882273 878853992 331951...
output:
125192010301771
result:
ok answer is '125192010301771'
Test #33:
score: 0
Accepted
time: 1130ms
memory: 18296kb
input:
1000000 557665492 416630929 774696033 499934580 485735365 463457259 538178939 833646725 262146556 32943620 341292664 44322607 88780995 627822566 141248141 925800822 695443926 756944430 394180768 661855282 584301029 176725390 754563531 28896142 601565973 50528076 761440221 714010505 440902528 4671876...
output:
125193812703795
result:
ok answer is '125193812703795'
Test #34:
score: 0
Accepted
time: 1327ms
memory: 24064kb
input:
1000000 709824633 700079457 368860115 455099462 869790394 972944538 595469325 331829154 381551666 794676845 890724462 71534410 367045495 569124985 666232646 73505318 13447728 635759506 852811063 789585811 145785757 832037950 344740282 914516449 829178127 365252407 169054618 951741654 970696811 33922...
output:
125031054224004
result:
ok answer is '125031054224004'
Test #35:
score: 0
Accepted
time: 1473ms
memory: 23240kb
input:
1000000 638806522 60416419 50815061 633635265 883352862 511983780 315562178 117115617 788579311 546122004 518397747 32520231 456445155 887995348 36441406 679433576 836645585 802241224 43080988 487311289 107368821 593165147 706891308 526165494 491040239 861442808 502587760 716629310 388464452 3438683...
output:
124806855869906
result:
ok answer is '124806855869906'
Test #36:
score: 0
Accepted
time: 1526ms
memory: 26232kb
input:
1000000 400187744 531044439 513887769 364981404 605276983 675450596 638592035 358203100 826963898 97591752 596101731 818134199 609870691 13542392 920718703 339425740 964864130 677726300 419039984 586439405 770842555 379633233 326511653 916888224 398614150 899750440 828695135 399998881 186140590 1189...
output:
124743304825965
result:
ok answer is '124743304825965'
Test #37:
score: 0
Accepted
time: 1ms
memory: 5696kb
input:
20 11 2 12 1 18 17 8 3 10 13 19 7 6 16 4 15 9 5 14 20 5 8 19 5 14 17 18 14 14 15 16
output:
54
result:
ok answer is '54'
Test #38:
score: 0
Accepted
time: 1ms
memory: 5548kb
input:
100 70 54 10 72 81 84 56 15 27 19 43 100 49 44 52 33 63 40 95 17 58 2 51 39 22 18 82 1 16 99 32 29 24 94 9 98 5 37 47 14 42 73 41 31 79 64 12 6 53 26 68 67 89 13 90 4 21 93 46 74 75 88 66 57 23 7 25 48 92 62 30 8 50 61 38 87 71 34 97 28 80 11 60 91 3 35 86 96 36 20 59 65 83 45 76 77 78 69 85 55 100 ...
output:
1947
result:
ok answer is '1947'
Test #39:
score: 0
Accepted
time: 0ms
memory: 5620kb
input:
1000 662 811 263 46 591 511 230 223 628 603 716 880 187 575 701 184 505 754 130 154 367 91 704 945 171 588 19 486 34 513 622 849 629 437 776 290 743 470 587 681 723 271 879 642 77 281 71 655 365 942 809 94 266 148 146 305 198 311 788 69 343 277 887 557 169 41 784 791 451 812 932 663 594 576 487 946 ...
output:
239121
result:
ok answer is '239121'
Test #40:
score: 0
Accepted
time: 4ms
memory: 5732kb
input:
10000 2246 4941 6031 8713 4705 3744 9374 9432 2502 7080 8851 5408 4724 8905 7565 1699 6660 8959 7798 2287 4610 8806 8128 451 1355 2111 8775 4903 7517 8983 8144 2578 9565 7332 3213 4943 6520 616 2559 5573 6391 7148 5121 8395 5618 8733 6132 3717 8549 9651 1291 9462 5941 2342 9625 398 3916 8586 4290 26...
output:
24628120
result:
ok answer is '24628120'
Test #41:
score: 0
Accepted
time: 196ms
memory: 11744kb
input:
75000 68463 69243 32173 49924 17959 46174 12182 71536 7215 24375 59186 65735 7859 28262 53441 24573 68483 12961 32472 19694 15018 22396 22571 53733 39855 33863 42844 62882 74855 5706 24661 49053 20535 12569 15491 72512 70818 9266 38716 2949 74606 74099 29288 21707 45980 19066 56794 19076 3550 71483 ...
output:
1404000900
result:
ok answer is '1404000900'
Test #42:
score: 0
Accepted
time: 26ms
memory: 6216kb
input:
100000 94437 49936 62522 1166 33452 90618 91436 81173 99242 37280 46125 44869 52811 45694 11550 29857 48941 56538 35057 40907 79925 70785 29658 19044 32804 11428 4127 92197 12680 61636 27200 56790 83389 80340 54411 15308 38952 78085 81397 37554 44186 33581 35662 73331 84991 32044 69012 82289 63495 6...
output:
2488710269
result:
ok answer is '2488710269'
Test #43:
score: 0
Accepted
time: 61ms
memory: 7024kb
input:
193531 25731 174531 69381 82754 69837 59264 186177 92971 169241 49669 83650 138393 54887 77577 137661 1582 81581 37205 74234 157021 19808 129017 71523 11557 110721 104584 110580 7005 106945 76203 146121 44920 5121 36266 129826 783 166526 57361 40052 140256 146278 23342 170680 7521 102958 81280 12696...
output:
9320436484
result:
ok answer is '9320436484'
Test #44:
score: 0
Accepted
time: 60ms
memory: 7008kb
input:
200000 148751 122775 166403 50359 136016 141561 178365 32573 135393 176137 146238 194135 119389 91101 197518 137753 20067 50308 97900 9284 158130 163540 74091 16489 28049 21774 164793 38473 20782 6813 192733 180117 96592 67087 27908 17403 2596 169966 7533 129730 7143 185980 67694 130252 164659 16237...
output:
9959720010
result:
ok answer is '9959720010'
Test #45:
score: 0
Accepted
time: 225ms
memory: 12632kb
input:
200000 77846 176007 37773 99802 161607 109885 7346 77714 23073 122244 84327 154323 53815 65234 33607 146370 133446 32211 25406 69645 158545 188675 95734 176185 112771 76816 194718 16830 113708 848 194904 52953 132297 158370 54948 187292 69949 142103 110065 16475 160487 104485 95412 187723 86368 5357...
output:
9984506006
result:
ok answer is '9984506006'
Test #46:
score: 0
Accepted
time: 96ms
memory: 9732kb
input:
500000 382660 472980 362261 62774 466648 424416 489558 412807 327383 291376 334151 386754 231907 490779 450741 167497 223866 50583 316973 150784 144912 474361 75300 490549 427762 325619 240881 466864 90490 343053 473390 278717 200739 378768 122616 416910 266231 401136 426047 435293 100485 313553 422...
output:
62049705399
result:
ok answer is '62049705399'
Test #47:
score: 0
Accepted
time: 112ms
memory: 10784kb
input:
500000 45453 348896 258429 209470 325025 423333 102874 135307 340523 101382 222911 479553 282995 227096 349216 143730 442257 35869 190858 37399 384261 1330 373623 297804 490255 151298 123841 305902 176401 443124 328990 436075 465017 282439 372830 435498 427009 362787 332047 466412 393191 369423 4193...
output:
62208159480
result:
ok answer is '62208159480'
Test #48:
score: 0
Accepted
time: 274ms
memory: 17008kb
input:
1000000 209845 651182 733523 269817 735483 3006 636063 19038 3528 504862 955665 797154 824150 856092 650817 648479 469208 24777 767626 903791 995139 845061 192704 100439 493712 557234 216258 755985 776531 84608 247720 169751 453783 127917 362791 720211 746679 897056 640348 248296 401971 53127 702491...
output:
249106105208
result:
ok answer is '249106105208'
Extra Test:
score: 0
Extra Test Passed