QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#137824 | #6342. Security Guard | Antekb# | 50 | 333ms | 24244kb | C++14 | 1020b | 2023-08-10 18:00:04 | 2024-07-04 01:31:06 |
Judging History
answer
#include<bits/stdc++.h>
#define st first
#define nd second
#define pb push_back
#define eb emplace_back
#define pp pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
using namespace std;
using vi = vector<int>;
using pii = pair<int, int>;
using vii = vector<pii>;
using ll = long long;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N=2e5+5;
vi E[N];
int tab[N];
int r[N];
int find(int v){
if(v==r[v])return v;
return r[v]=find(r[v]);
}
int main(){
int n, m, q;
cin>>n>>m>>q;
ll sum=0;
int ma=0;
for(int i=1; i<=n; i++){
cin>>tab[i];
r[i]=i;
sum-=tab[i];
ma=max(ma, tab[i]);
}
vector<pair<int, pii> > V;
for(int i=0; i<m; i++){
int u, v;
cin>>u>>v;
E[u].pb(v);
E[v].pb(u);
V.eb(tab[u]+tab[v], mp(u, v));
}
sort(all(V));
for(int i=0; i<m; i++){
int c=V[i].st;
int u=V[i].nd.st, v=V[i].nd.nd;
u=find(u);
v=find(v);
if(u!=v){
r[u]=v;
sum+=c;
}
}
cout<<sum+ma;
}
詳細信息
Subtask #1:
score: 12
Accepted
Test #1:
score: 12
Accepted
time: 102ms
memory: 18140kb
input:
200000 199999 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
199999
result:
ok 1 number(s): "199999"
Test #2:
score: 0
Accepted
time: 99ms
memory: 18100kb
input:
200000 199999 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
399998
result:
ok 1 number(s): "399998"
Test #3:
score: 0
Accepted
time: 100ms
memory: 18056kb
input:
200000 199999 0 1 2 1 1 1 2 2 1 2 1 1 2 2 2 2 1 1 2 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 1 2 2 1 2 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 2 2 1 1 1 2 1 1 1 2 2 1 1 1 2 2 2 2 1 1 2 2 1 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 1 2 1 1 1 2 2 2 1 2 1 1 1 2 1 2 2 2 1 2 1 1 1 1 2 2 1 1 2 1 2 1 2 1 2 ...
output:
299700
result:
ok 1 number(s): "299700"
Test #4:
score: 0
Accepted
time: 117ms
memory: 18192kb
input:
200000 199999 0 2 2 1 2 1 2 2 2 1 1 2 2 1 2 1 2 1 1 2 2 2 2 1 1 2 2 2 1 1 1 1 1 2 2 1 2 2 2 2 1 2 1 2 2 1 1 2 1 1 2 2 2 1 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 1 1 1 2 1 1 1 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 1 2 1 2 2 1 2 1 1 1 1 2 1 1 1 1 1 2 1 2 1 2 2 2 2 2 1 2 2 1 2 1 2 1 1 2 1 2 2 1 2 2 1 2 1 1 ...
output:
300131
result:
ok 1 number(s): "300131"
Test #5:
score: 0
Accepted
time: 108ms
memory: 18780kb
input:
200000 199999 0 1 2 2 1 1 1 1 2 2 1 2 2 1 2 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 2 2 2 1 2 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 2 2 1 1 1 2 1 1 2 1 1 2 2 1 2 2 2 2 2 1 2 2 2 1 2 2 1 1 2 2 2 1 2 2 2 1 1 2 1 2 2 2 1 2 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 1 2 1 1 1 2 1 2 2 2 1 2 2 1 2 1 1 1 1 1 2 1 1 2 1 2 1 1 2 2 2 2 ...
output:
300132
result:
ok 1 number(s): "300132"
Test #6:
score: 0
Accepted
time: 111ms
memory: 17892kb
input:
200000 199999 0 2 1 1 2 2 2 1 1 2 2 1 2 2 2 1 1 1 2 1 2 2 1 1 1 1 2 1 2 1 1 1 1 2 2 1 1 1 1 2 1 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 1 1 1 1 2 2 2 2 1 2 2 1 2 1 1 1 2 2 1 2 2 1 1 1 2 2 2 2 2 2 2 2 1 1 2 1 2 2 1 2 1 2 1 1 1 1 2 1 1 2 2 2 2 1 1 1 2 1 2 1 1 1 1 2 1 1 1 1 1 1 2 1 2 1 2 1 2 1 1 ...
output:
300094
result:
ok 1 number(s): "300094"
Test #7:
score: 0
Accepted
time: 2ms
memory: 8668kb
input:
2 1 0 2 1 1 2
output:
2
result:
ok 1 number(s): "2"
Subtask #2:
score: 13
Accepted
Dependency #1:
100%
Accepted
Test #8:
score: 13
Accepted
time: 145ms
memory: 18180kb
input:
200000 199999 0 888688136 635144878 255996991 457498818 501986248 161166265 760280211 255673948 435333678 521749421 41382586 784453705 702026010 746126 770719498 150796793 890458633 167539898 952822340 613539963 472897894 866040523 778440023 870323479 702145156 736556675 190255428 993487185 74569854...
output:
99991732542677
result:
ok 1 number(s): "99991732542677"
Test #9:
score: 0
Accepted
time: 143ms
memory: 18092kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
199999000000000
result:
ok 1 number(s): "199999000000000"
Test #10:
score: 0
Accepted
time: 133ms
memory: 18348kb
input:
200000 199999 0 994 5896 9483 12355 19728 24786 37166 41115 48477 49060 51336 61764 62276 64085 69469 70046 70342 76009 76047 77866 83444 88315 93003 101882 102439 115518 123564 126489 128853 129342 135936 138010 138667 139203 145762 146987 147190 149373 149615 157973 158278 162698 167978 171042 175...
output:
100080650219840
result:
ok 1 number(s): "100080650219840"
Test #11:
score: 0
Accepted
time: 140ms
memory: 17980kb
input:
200000 199999 0 999979375 999979056 999977631 999969139 999969059 999968218 999965977 999964154 999963336 999962193 999949370 999945779 999935677 999930665 999922468 999916390 999909525 999894572 999883487 999873968 999867979 999867403 999865926 999860824 999860075 999845853 999845152 999844663 9998...
output:
100207782866930
result:
ok 1 number(s): "100207782866930"
Test #12:
score: 0
Accepted
time: 141ms
memory: 18104kb
input:
200000 199999 0 7869 327930555 260846420 794808410 502941904 411659428 130207885 612162720 504413407 18761445 863244627 896146594 998979189 104704277 991405413 249077560 74683811 82341504 801586757 961844951 329658898 519489393 391322365 176325343 668128590 140579049 585287703 271548306 934655750 73...
output:
100077877975415
result:
ok 1 number(s): "100077877975415"
Test #13:
score: 0
Accepted
time: 140ms
memory: 18484kb
input:
200000 199999 0 999999712 881643707 435809178 684158484 863581784 731961708 185392983 345993271 858967503 700991749 445253242 127512192 507651836 285959415 559560102 489162406 745169466 502306045 221121071 897080407 534280273 740385163 179375193 459472967 186920255 396206170 580100609 474627515 1895...
output:
99924146368063
result:
ok 1 number(s): "99924146368063"
Test #14:
score: 0
Accepted
time: 137ms
memory: 18160kb
input:
200000 199999 0 2318 644514716 771740123 172494898 506479467 277861513 1718728 772329873 128164907 648051857 976129300 340343571 313675124 57410012 698648189 320365186 170436389 762471240 303688530 972439412 769423137 633817440 202438676 658846441 921753866 360290970 463617398 907628038 449272286 52...
output:
99901846804322
result:
ok 1 number(s): "99901846804322"
Test #15:
score: 0
Accepted
time: 137ms
memory: 18180kb
input:
200000 199999 0 596 480572608 206680083 710577253 753679652 951511383 347984183 525757321 212513624 4689186 597648153 486377551 10137051 663490585 928622677 977392246 501049475 49856763 479649250 962546801 700479992 161518533 848997160 8623311 666288000 33482963 822409871 649141657 827719637 2986910...
output:
100053631296741
result:
ok 1 number(s): "100053631296741"
Subtask #3:
score: 12
Accepted
Dependency #2:
100%
Accepted
Test #16:
score: 12
Accepted
time: 178ms
memory: 18640kb
input:
200000 199999 0 914481135 246465161 578713167 122034612 360205646 243313836 503911461 62137819 868863787 802884496 618725473 292817201 920732219 769519242 254063829 818858999 999225205 237536786 765397639 168830615 838535361 255328583 977944440 726449619 513972057 331170498 152277283 429709926 87555...
output:
100069182381812
result:
ok 1 number(s): "100069182381812"
Test #17:
score: 0
Accepted
time: 166ms
memory: 18640kb
input:
200000 199999 0 286901748 733271463 382153953 89484876 539600498 960749263 32931330 316924518 493820539 295575957 625515682 921884369 760511422 818252021 291711995 181586833 144156304 310110242 629685476 272273654 200357089 705687474 439012819 573075752 943681407 776826981 644109931 757588674 625120...
output:
100235536638060
result:
ok 1 number(s): "100235536638060"
Test #18:
score: 0
Accepted
time: 177ms
memory: 18144kb
input:
200000 199999 0 344688169 255860606 558168603 524369927 718152921 590234297 368169946 457793293 315796451 30207486 725084340 815353112 693260659 55146713 2663448 370725472 859509534 105402181 427711883 857508517 941651676 656448392 273008479 181185122 749648998 633865546 864459010 691892596 60291490...
output:
100001564280894
result:
ok 1 number(s): "100001564280894"
Test #19:
score: 0
Accepted
time: 170ms
memory: 18224kb
input:
200000 199999 0 903128668 637946928 411773015 301264685 589344245 996712065 133866948 326017203 226040815 594160426 999313084 625945972 220452104 571410556 748929291 482689167 314775336 290818814 747321630 821701361 27913952 512843131 867633260 966260812 668930360 126037745 311377897 187004983 45994...
output:
99827761913536
result:
ok 1 number(s): "99827761913536"
Test #20:
score: 0
Accepted
time: 165ms
memory: 19540kb
input:
200000 199999 0 338777493 396323049 828714250 287060453 343177915 317900154 52828545 149261074 535342208 482710176 266571424 639199906 492206264 288464542 741630852 271588624 383568979 675692022 363916807 315165883 190620876 670739405 964814475 443166431 764540753 841708786 985700238 983455773 35036...
output:
97124415049320
result:
ok 1 number(s): "97124415049320"
Test #21:
score: 0
Accepted
time: 173ms
memory: 19208kb
input:
200000 199999 0 486318373 572575862 750998535 965803903 292531235 974671390 504324246 552058236 994259720 40433589 282847712 661287966 999407067 682424544 627062198 444183785 515144101 12138232 435297495 849430853 508197757 298991174 54370249 596064758 593458590 626110749 555029125 699212532 3045078...
output:
99042020468796
result:
ok 1 number(s): "99042020468796"
Test #22:
score: 0
Accepted
time: 157ms
memory: 18912kb
input:
200000 199999 0 477051297 663907013 306045059 770761047 69267065 361605958 196068394 213265361 64371241 61340932 295690745 948722075 817006217 552833347 721385881 456481639 759677301 825563079 354237113 195206131 344633884 857391283 558321635 468135525 105025328 153014320 841110192 207750265 1253326...
output:
66641033606763
result:
ok 1 number(s): "66641033606763"
Test #23:
score: 0
Accepted
time: 162ms
memory: 19204kb
input:
200000 199999 0 828440470 526173936 545214898 648042193 762049613 756067725 963796263 547005493 480357404 301217810 675876458 985872877 413535379 279749800 88896479 280935333 996212783 324144762 126373694 474685806 176163038 124054003 690341759 438573240 371060473 351366508 240092217 85188078 712569...
output:
134359558990839
result:
ok 1 number(s): "134359558990839"
Test #24:
score: 0
Accepted
time: 155ms
memory: 18912kb
input:
200000 199999 0 266608726 460634754 977074775 822905484 461567083 115668124 438968387 196401786 671694866 950289716 63649794 209087319 654048662 655347574 864124028 195211689 922174680 654758740 665042814 981042343 581496785 841283906 927089962 243012171 979843731 436666423 224907265 391214 87798189...
output:
181037937205831
result:
ok 1 number(s): "181037937205831"
Test #25:
score: 0
Accepted
time: 172ms
memory: 19068kb
input:
200000 199999 0 328144014 55421949 619542587 459033129 490882056 76869891 190620552 90692535 748393540 766062716 177690418 877521959 886238269 12231794 725265603 712660220 906655086 15990914 687439467 232150210 931310641 714881601 397603724 4144823 296897042 77568328 794707143 352612409 616127430 85...
output:
91467654262025
result:
ok 1 number(s): "91467654262025"
Test #26:
score: 0
Accepted
time: 167ms
memory: 19108kb
input:
200000 199999 0 564057643 287217761 587796692 634253283 819938148 989829226 997482238 797995692 979862409 65758916 307740571 767726836 391462457 954735339 40242369 853203819 815304284 35453141 55984282 709616289 636650067 150641299 278796057 248361736 164010195 265207794 539750905 239009816 88286619...
output:
98863709411012
result:
ok 1 number(s): "98863709411012"
Test #27:
score: 0
Accepted
time: 169ms
memory: 18752kb
input:
200000 199999 0 393015405 712775284 828435276 220720919 107766028 383714392 616205875 319126366 50146799 162138309 296956727 857370139 179086384 778766437 665652824 177297075 158303219 974272985 978850484 442018495 332361324 241525092 688882107 5303117 385025983 211177720 349226373 483347357 9000497...
output:
105857803211017
result:
ok 1 number(s): "105857803211017"
Test #28:
score: 0
Accepted
time: 155ms
memory: 18884kb
input:
200000 199999 0 940625727 412211984 736404856 508320967 84477804 514857342 505943210 814894905 272095639 752041107 907505885 647024742 173346552 627711116 808286312 388816513 82646198 896787619 752656074 522302034 707075966 233054590 90464302 637761534 919578257 395743317 734629876 366564284 3490118...
output:
182516272827989
result:
ok 1 number(s): "182516272827989"
Test #29:
score: 0
Accepted
time: 176ms
memory: 18372kb
input:
200000 199999 0 690397146 633385234 963824237 25384452 355698429 313062750 805905556 78807618 415312498 873056638 973614972 521402277 219515948 975268338 650510561 772096901 327018702 51288468 723753931 658041414 814574816 48171291 657920821 652121880 858966818 189175164 397065779 23944592 899713848...
output:
89193341757674
result:
ok 1 number(s): "89193341757674"
Test #30:
score: 0
Accepted
time: 156ms
memory: 17940kb
input:
200000 199999 0 30517 15258 15258 7629 15258 61035 30517 15258 122070 15258 61035 15258 7629 15258 30517 15258 30517 30517 7629 61035 61035 61035 15258 7629 15258 15258 30517 7629 7629 15258 7629 30517 7629 122070 30517 15258 122070 15258 61035 15258 7629 15258 15258 7629 244140 30517 7629 7629 7629...
output:
33051663386
result:
ok 1 number(s): "33051663386"
Test #31:
score: 0
Accepted
time: 169ms
memory: 18684kb
input:
200000 199999 0 1000000000 1000000000 860000000 870000000 1000000000 1000000000 1000000000 188155 870000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 181249 1000000000 182782 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10...
output:
129889513156478
result:
ok 1 number(s): "129889513156478"
Test #32:
score: 0
Accepted
time: 177ms
memory: 19032kb
input:
200000 199999 0 1000000000 900000000 1000000000 1000000000 184753 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 860000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 186029 194241 1000000000 1000000000 1000000000 1...
output:
165109364813694
result:
ok 1 number(s): "165109364813694"
Test #33:
score: 0
Accepted
time: 164ms
memory: 19768kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
198936244139390
result:
ok 1 number(s): "198936244139390"
Test #34:
score: 0
Accepted
time: 178ms
memory: 19256kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
199471181935230
result:
ok 1 number(s): "199471181935230"
Test #35:
score: 0
Accepted
time: 164ms
memory: 18472kb
input:
200000 199999 0 1000000000 1000000000 1000000000 194558 100000000 1000000000 1000000000 100000000 140966 169538 1000000000 1000000000 100000000 199312 1000000000 1000000000 100000000 1000000000 1000000000 100000000 100000000 146014 165840 161331 1000000000 198859 1000000000 196249 182467 1000000000 ...
output:
73999900000000
result:
ok 1 number(s): "73999900000000"
Test #36:
score: 0
Accepted
time: 165ms
memory: 18980kb
input:
200000 199999 0 1000000000 172320 153334 137042 109623 1000000000 1000000000 120846 1000000000 1000000000 100793 100992 194055 170835 177895 135084 106612 1000000000 1000000000 100107 115514 1000000000 1000000000 135996 156654 177678 1000000000 1000000000 181701 1000000000 1000000000 135862 10000000...
output:
100014999750001
result:
ok 1 number(s): "100014999750001"
Test #37:
score: 0
Accepted
time: 168ms
memory: 18648kb
input:
200000 199999 0 333333333 60048 100000000 333333333 100000000 333333333 190442 171984 333333333 333333333 73334 164825 100000000 162249 100000000 100000000 54754 40665 333333333 100000000 333333333 185399 186549 171454 195144 183371 100000000 333333333 177092 333333333 100000000 333333333 100000000 ...
output:
34672333286667
result:
ok 1 number(s): "34672333286667"
Test #38:
score: 0
Accepted
time: 161ms
memory: 17904kb
input:
200000 199999 0 10645 27057 71776 65505 99990 112118 78968 122225 78739 128376 4883 190763 181003 196054 60747 120641 177085 25695 121753 162316 173640 156954 63947 148522 15803 138710 17961 106417 110340 145341 60333 88014 110753 187123 132483 139941 24781 117719 103264 164319 178083 86070 100771 1...
output:
20000099999
result:
ok 1 number(s): "20000099999"
Test #39:
score: 0
Accepted
time: 144ms
memory: 19500kb
input:
200000 199999 0 194890 121452 195780 115564 4962 33741 63306 60033 93698 76394 127179 17118 196789 107487 113920 83411 81698 48079 65601 137981 135333 132404 173834 155677 396 31942 71937 20974 8768 186619 173622 29383 199760 25259 172674 12767 70564 98913 135650 127559 81832 39930 186729 81772 2867...
output:
20000299997
result:
ok 1 number(s): "20000299997"
Test #40:
score: 0
Accepted
time: 177ms
memory: 18916kb
input:
199999 199998 0 536645616 14808653 536645616 14808653 14808653 536645616 536645616 536645616 536645616 14808653 14808653 14808653 536645616 14808653 536645616 536645616 14808653 14808653 14808653 536645616 14808653 14808653 14808653 536645616 14808653 536645616 14808653 536645616 536645616 536645616...
output:
55374483709451
result:
ok 1 number(s): "55374483709451"
Test #41:
score: 0
Accepted
time: 172ms
memory: 18308kb
input:
199998 199997 0 320810772 899782304 604932831 696541279 750794608 670544561 698330710 600242206 710241804 631312737 374107094 137682379 277764325 355365753 916345633 648555879 915074305 829233349 442703000 185919976 795151739 389389780 687123856 195510374 308656657 46309337 110710812 510114099 26395...
output:
99448692576749
result:
ok 1 number(s): "99448692576749"
Test #42:
score: 0
Accepted
time: 175ms
memory: 18976kb
input:
199997 199996 0 999999998 999999999 999999998 1000000000 999999999 999999998 999999998 1000000000 1000000000 1000000000 999999998 999999998 999999998 999999998 999999999 999999999 999999999 999999998 999999999 1000000000 999999999 999999998 999999998 999999998 999999999 999999998 999999999 999999998...
output:
199995999800563
result:
ok 1 number(s): "199995999800563"
Test #43:
score: 0
Accepted
time: 171ms
memory: 18636kb
input:
200000 199999 0 999999999 999999999 999999996 999999995 999999999 999999995 999999998 999999996 999999999 999999998 1000000000 999999999 999999996 999999999 1000000000 999999997 999999995 999999997 999999995 999999995 999999995 999999999 999999996 999999999 999999995 999999995 999999999 1000000000 1...
output:
199998999500313
result:
ok 1 number(s): "199998999500313"
Test #44:
score: 0
Accepted
time: 174ms
memory: 18212kb
input:
200000 199999 0 1000000000 999999984 999999982 999999999 999999982 999999989 999999987 999999988 999999995 999999995 999999990 999999986 1000000000 999999981 999999988 999999986 999999985 999999986 999999987 999999985 999999984 999999993 999999983 999999980 999999986 999999993 999999989 999999989 99...
output:
199998997994491
result:
ok 1 number(s): "199998997994491"
Test #45:
score: 0
Accepted
time: 182ms
memory: 18324kb
input:
200000 199999 0 999999731 999999841 999999763 999999740 999999656 999999794 999999913 999999723 999999812 999999963 999999661 999999907 999999695 999999570 999999599 999999968 999999799 999999588 999999856 999999652 999999906 999999605 999999800 999999983 999999692 999999904 999999711 999999665 9999...
output:
199998954848314
result:
ok 1 number(s): "199998954848314"
Test #46:
score: 0
Accepted
time: 177ms
memory: 18156kb
input:
200000 199999 0 259236944 719027583 455234208 486310742 131760855 873063916 312673990 70059657 227242155 154234330 580755302 205474311 647386608 942585802 508059239 755986146 604840105 795135459 965657184 19713600 375498113 771802497 433807814 806288763 763137158 620333348 244884900 394268474 112012...
output:
81864318991493
result:
ok 1 number(s): "81864318991493"
Test #47:
score: 0
Accepted
time: 162ms
memory: 18280kb
input:
200000 199999 0 760345764 709012625 565057445 440960610 743125542 745373670 951319932 520901588 357674243 961871424 53919581 279805413 931117593 148907836 834074214 44642902 533549571 645329342 844210621 147980537 602487720 316813286 67302651 561057275 873596266 187057631 378207465 275839499 3636645...
output:
118195223121806
result:
ok 1 number(s): "118195223121806"
Test #48:
score: 0
Accepted
time: 185ms
memory: 18372kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
199999000000000
result:
ok 1 number(s): "199999000000000"
Test #49:
score: 0
Accepted
time: 147ms
memory: 18452kb
input:
200000 199999 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
199999
result:
ok 1 number(s): "199999"
Subtask #4:
score: 13
Accepted
Dependency #3:
100%
Accepted
Test #50:
score: 13
Accepted
time: 176ms
memory: 18280kb
input:
200000 209698 0 452284884 684461670 742500681 657366073 908840618 552655560 851090552 489523748 970080962 756759099 112719959 935405817 981941347 89654407 465949026 473717871 855186598 212811721 602648292 879660286 288911908 267890454 983880095 144232364 762009970 276460090 908819335 214091251 52969...
output:
99971599939328
result:
ok 1 number(s): "99971599939328"
Test #51:
score: 0
Accepted
time: 181ms
memory: 18472kb
input:
200000 212502 0 836442565 382354275 345994733 710835879 738731375 588958149 740154329 454747058 71009433 267626943 636138449 891429669 517802404 386375460 597808315 804948210 211464779 284539642 548681817 941738432 587991619 403554860 464250451 625857283 210026469 69145852 361358017 588384433 734420...
output:
100082680652608
result:
ok 1 number(s): "100082680652608"
Test #52:
score: 0
Accepted
time: 195ms
memory: 22728kb
input:
200000 262644 0 883665345 572116713 539845694 544786727 781452678 373633504 599040410 488635817 890807823 484100966 810057998 811184452 172508760 218907175 644040462 292707063 89793247 700691463 301161786 360580357 888304566 113475540 385767988 469406458 455071138 110977214 908364987 738822760 92617...
output:
99617066187869
result:
ok 1 number(s): "99617066187869"
Test #53:
score: 0
Accepted
time: 306ms
memory: 23688kb
input:
200000 400000 0 440631799 921788803 247540373 520834665 254515662 654181900 28117478 362360816 133215308 673353976 839110893 684149537 48572715 353875036 595611725 214629655 277669655 58163856 561793334 445489281 12314554 60323127 752660649 141317835 590307472 348600262 791720557 791624721 219358305...
output:
100251321069595
result:
ok 1 number(s): "100251321069595"
Test #54:
score: 0
Accepted
time: 290ms
memory: 24084kb
input:
200000 400000 0 719654288 613219476 314128326 621805918 799898964 864200077 453630401 936102906 947426608 47999838 981723891 307427615 8714794 399868928 296949620 623089727 546282441 265434168 618406443 571938122 930708755 611934319 911556234 589137962 466863348 549210813 964528176 714831829 8410579...
output:
98575099700435
result:
ok 1 number(s): "98575099700435"
Test #55:
score: 0
Accepted
time: 295ms
memory: 24244kb
input:
200000 400000 0 907450047 932482210 946040817 933570958 527673460 926794712 427082005 923538920 728660488 636851648 891118781 253387454 69254022 278012316 325229106 784048084 710107418 618859641 805311601 113644215 177277687 791799032 163243515 541518773 35684929 672753537 581153377 383439504 616178...
output:
130084783812602
result:
ok 1 number(s): "130084783812602"
Test #56:
score: 0
Accepted
time: 220ms
memory: 23784kb
input:
200000 296563 0 202653091 446328599 893697326 248129158 559975893 459840248 80980740 793441542 346103184 503269641 866920922 259961983 612354717 410714957 210566769 574157478 328384036 473342104 738709561 964000920 127779949 733481677 904305071 939113237 798359231 118982267 978671367 867486578 58814...
output:
174529306250228
result:
ok 1 number(s): "174529306250228"
Test #57:
score: 0
Accepted
time: 298ms
memory: 23268kb
input:
200000 400000 0 361182034 849033441 553507256 739836985 521032912 287156681 856855507 19357746 627449254 795136604 602213208 953642286 865882411 233973980 919228952 978668642 789188990 71859157 394375990 819755729 345616686 12855613 416536646 985760562 636162221 331011259 946070098 618810157 8974777...
output:
64221583286807
result:
ok 1 number(s): "64221583286807"
Test #58:
score: 0
Accepted
time: 295ms
memory: 22676kb
input:
200000 400000 0 142076351 739621076 123248892 233251878 807892649 342842679 529364946 598349837 228492517 607311218 905622205 402448887 939186742 509207051 599218009 294740045 251366639 944842908 103471363 387716971 528182393 118502310 793657772 664461509 291047433 980320029 860533760 229603386 7444...
output:
58139826597158
result:
ok 1 number(s): "58139826597158"
Test #59:
score: 0
Accepted
time: 181ms
memory: 18592kb
input:
200000 213476 0 358481948 360681190 345628035 419532243 494572695 155565994 5587178 974986690 100025334 996616687 124619446 922488884 351188286 478785337 5477586 404201988 929418078 152590733 829729072 562956814 800221513 839680648 84785566 165605257 825292059 122466699 190532014 495223963 52049543 ...
output:
114439386518305
result:
ok 1 number(s): "114439386518305"
Test #60:
score: 0
Accepted
time: 236ms
memory: 22680kb
input:
200000 294320 0 604137925 528447036 215398581 755234952 130100062 279563164 520489956 950449344 86851319 587584193 376856289 798460893 663223721 964151969 394998042 518324201 625115158 227078278 763259043 393744756 640012865 653104478 347288237 231982507 772475642 691587670 249662159 777874223 33516...
output:
89733815463372
result:
ok 1 number(s): "89733815463372"
Test #61:
score: 0
Accepted
time: 315ms
memory: 23696kb
input:
200000 400000 0 294687466 229057605 35244879 700472739 363628289 78140544 924787867 4434773 21643946 622649918 576037029 679235437 552308776 875642952 159826132 599605668 999674033 577844371 239317164 971290546 27428895 32711599 361776915 41478706 548865091 313368633 372811456 492738585 319432347 62...
output:
56750265861242
result:
ok 1 number(s): "56750265861242"
Test #62:
score: 0
Accepted
time: 290ms
memory: 23608kb
input:
200000 400000 0 710481530 668400065 117121513 863494011 133462637 905385968 974883047 291536744 78783480 337399839 170739846 777211553 793997231 186867942 649597315 667907465 881359004 818582242 699744214 579108322 668176368 475147658 546846312 247978065 992821265 662693719 612733845 706970471 63755...
output:
114562086175922
result:
ok 1 number(s): "114562086175922"
Test #63:
score: 0
Accepted
time: 317ms
memory: 23484kb
input:
200000 400000 0 876474757 464205649 654830842 726138413 757598478 786231027 443820982 947287597 225816544 223531492 675011117 194892403 933514675 797241804 260951764 477127137 935808057 273924243 534280074 309038301 731862858 234691671 614499742 161603580 877273012 794026847 827219990 269267701 4339...
output:
118328027922147
result:
ok 1 number(s): "118328027922147"
Test #64:
score: 0
Accepted
time: 156ms
memory: 17996kb
input:
200000 199999 0 7629 7629 61035 15258 15258 7629 7629 30517 15258 7629 15258 7629 7629 61035 122070 7629 7629 15258 7629 30517 244140 61035 7629 15258 61035 30517 61035 122070 7629 976562 15258 15258 15258 15258 7629 30517 61035 15258 15258 7629 30517 30517 122070 15258 30517 61035 7629 7629 7629 76...
output:
33051663386
result:
ok 1 number(s): "33051663386"
Test #65:
score: 0
Accepted
time: 253ms
memory: 22216kb
input:
200000 325530 0 1000000000 1000000000 192747 176972 190626 1000000000 167296 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 860000000 850000000 1000000000 1000000000 185957 850000000 1000000000 870000000 172607 1000000000 1000000000 1000000000 171292 178842 1000000000 1000000000 1...
output:
129889513156478
result:
ok 1 number(s): "129889513156478"
Test #66:
score: 0
Accepted
time: 181ms
memory: 19264kb
input:
200000 223641 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 195575 1000000000 1000000000 198159 187738 890000000 1000000000 1000000000 184262 1000000000 1000...
output:
165109364813694
result:
ok 1 number(s): "165109364813694"
Test #67:
score: 0
Accepted
time: 174ms
memory: 19336kb
input:
200000 200022 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
198936244139390
result:
ok 1 number(s): "198936244139390"
Test #68:
score: 0
Accepted
time: 182ms
memory: 19284kb
input:
200000 200010 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 920000000 1000000000 1000000000 920000000 199849 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000...
output:
199471181935230
result:
ok 1 number(s): "199471181935230"
Test #69:
score: 0
Accepted
time: 169ms
memory: 18488kb
input:
200000 199999 0 149072 100000000 154970 1000000000 194023 181452 100000000 100000000 1000000000 156156 1000000000 191607 100000000 100000000 1000000000 134660 100000000 194803 141235 1000000000 184624 148189 100000000 1000000000 132339 1000000000 177353 1000000000 100000000 1000000000 100000000 1000...
output:
73999900000000
result:
ok 1 number(s): "73999900000000"
Test #70:
score: 0
Accepted
time: 164ms
memory: 19032kb
input:
200000 200006 0 1000000000 115567 146768 171558 1000000000 128532 1000000000 105856 111475 138525 168851 1000000000 185084 1000000000 1000000000 103150 1000000000 199118 139172 129957 1000000000 1000000000 1000000000 1000000000 1000000000 165482 110777 104126 155640 1000000000 1000000000 1000000000 ...
output:
100014999750001
result:
ok 1 number(s): "100014999750001"
Test #71:
score: 0
Accepted
time: 176ms
memory: 18788kb
input:
200000 200006 0 100000000 333333333 333333333 100000000 333333333 173897 48151 333333333 333333333 333333333 43146 100000000 333333333 333333333 333333333 333333333 165650 100000000 43932 333333333 333333333 100000000 62475 163108 46943 194752 333333333 47554 52374 73762 184023 181177 160160 3333333...
output:
34672333286667
result:
ok 1 number(s): "34672333286667"
Test #72:
score: 0
Accepted
time: 164ms
memory: 17856kb
input:
200000 199999 0 65510 171911 14563 168649 83212 159024 1099 67484 130946 27182 38232 156649 135900 6908 49812 182408 175306 87309 32988 155641 118720 33481 159856 87521 111667 134788 186560 156728 172320 167639 86528 162501 136241 168424 100764 180299 187402 131137 129658 57391 191034 158917 61004 8...
output:
20000099999
result:
ok 1 number(s): "20000099999"
Test #73:
score: 0
Accepted
time: 160ms
memory: 19316kb
input:
200000 199999 0 59443 132629 28784 194296 88183 143602 45808 151465 99877 105948 21554 181113 192394 99026 51822 14454 152235 24908 77189 125650 50161 64721 99064 846 32916 147983 28268 62762 103052 77958 114920 189256 133601 101779 129394 105157 85467 54767 1854 189620 196067 123338 47234 150686 16...
output:
20000299997
result:
ok 1 number(s): "20000299997"
Test #74:
score: 0
Accepted
time: 195ms
memory: 18656kb
input:
199999 214683 0 969121134 527415732 969121134 969121134 527415732 527415732 527415732 527415732 969121134 969121134 527415732 527415732 969121134 969121134 527415732 527415732 527415732 527415732 969121134 969121134 969121134 527415732 969121134 969121134 969121134 527415732 527415732 969121134 9691...
output:
149663232698184
result:
ok 1 number(s): "149663232698184"
Test #75:
score: 0
Accepted
time: 320ms
memory: 23468kb
input:
199998 400000 0 709246141 162189789 321213311 533968074 877098564 568650650 753535960 595648634 805855740 784038597 680870280 110368278 824252707 102908385 451213234 777703489 106847190 426640692 690343895 650909212 480856552 437670541 107708084 703502500 610220573 410228855 136331 778822364 9638100...
output:
97429975101707
result:
ok 1 number(s): "97429975101707"
Test #76:
score: 0
Accepted
time: 212ms
memory: 19312kb
input:
199997 254215 0 999999998 999999998 1000000000 999999999 999999998 999999998 1000000000 999999999 999999999 1000000000 999999998 999999999 999999999 1000000000 999999998 1000000000 999999999 1000000000 999999998 999999999 999999999 999999999 999999999 999999999 1000000000 999999999 1000000000 999999...
output:
199995999800058
result:
ok 1 number(s): "199995999800058"
Test #77:
score: 0
Accepted
time: 289ms
memory: 23200kb
input:
200000 359275 0 1000000000 999999996 999999996 999999997 999999996 999999998 999999995 999999997 999999999 999999996 999999995 999999998 1000000000 999999998 999999998 999999996 1000000000 999999999 999999997 999999998 999999995 999999997 999999995 999999997 999999998 999999996 1000000000 999999997 ...
output:
199998999500927
result:
ok 1 number(s): "199998999500927"
Test #78:
score: 0
Accepted
time: 313ms
memory: 23116kb
input:
200000 400000 0 999999996 999999986 999999993 999999989 999999995 999999999 999999990 999999989 999999983 999999997 999999989 999999988 999999990 999999983 999999981 999999988 999999980 999999998 999999980 999999983 999999988 999999986 999999986 999999991 999999990 999999999 999999997 999999986 9999...
output:
199998997996203
result:
ok 1 number(s): "199998997996203"
Test #79:
score: 0
Accepted
time: 320ms
memory: 22920kb
input:
200000 400000 0 999999763 999999933 999999699 999999596 999999911 999999558 999999592 999999615 999999916 999999575 999999686 999999894 999999621 999999663 999999767 999999553 999999960 999999655 999999838 999999753 999999654 999999872 999999797 999999919 999999678 999999554 999999610 999999839 9999...
output:
199998954886806
result:
ok 1 number(s): "199998954886806"
Test #80:
score: 0
Accepted
time: 333ms
memory: 23264kb
input:
200000 400000 0 824652947 957132193 706157207 906916814 795301148 908106405 654918617 218822636 183052359 990244852 66484720 899839515 44941065 702088631 646432597 185940923 803128159 309513264 399642941 849887349 755802183 11119537 281418302 286886129 513334496 142522748 843500031 684230930 3181335...
output:
82198974610270
result:
ok 1 number(s): "82198974610270"
Test #81:
score: 0
Accepted
time: 183ms
memory: 18252kb
input:
200000 199999 0 141439977 13822822 284084842 681563652 657137711 167551750 568527727 543628457 101680001 671996641 469900419 345828166 535643306 888824552 994316893 581748869 838249872 925632810 611514863 192453510 808057603 646396488 409147456 455864658 168647087 685665969 837113347 185955003 59350...
output:
116734700685646
result:
ok 1 number(s): "116734700685646"
Test #82:
score: 0
Accepted
time: 183ms
memory: 18720kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
199999000000000
result:
ok 1 number(s): "199999000000000"
Test #83:
score: 0
Accepted
time: 149ms
memory: 19032kb
input:
200000 199999 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
199999
result:
ok 1 number(s): "199999"
Test #84:
score: 0
Accepted
time: 325ms
memory: 23340kb
input:
200000 400000 0 345798946 421967616 105169157 709952072 929731471 832249712 541209015 934397088 79304068 543105426 543275789 679182356 408923358 748632141 515863124 737915975 408967115 532643373 921444282 649305327 674564571 815672837 544051326 537452209 336053691 975716430 928911526 383701106 23930...
output:
52137915559606
result:
ok 1 number(s): "52137915559606"
Subtask #5:
score: 0
Wrong Answer
Test #85:
score: 0
Wrong Answer
time: 0ms
memory: 8728kb
input:
16 15 200000 692461146 622302385 805066691 422290641 600839873 940930580 873147413 489653843 239129952 383473127 21389393 913787109 856138328 859082963 262475462 327598064 6 13 6 9 6 15 6 14 6 16 6 8 5 6 1 6 4 6 3 6 6 11 6 7 6 10 2 6 6 12
output:
14113958700
result:
wrong answer Answer contains longer sequence [length = 200001], but output contains 1 elements
Subtask #6:
score: 0
Skipped
Dependency #5:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%