QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#138020#6342. Security GuardRafi22#37 180ms26504kbC++141.4kb2023-08-10 20:52:542024-07-04 01:34:21

Judging History

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

  • [2024-07-04 01:34:21]
  • 评测
  • 测评结果:37
  • 用时:180ms
  • 内存:26504kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-10 20:52:54]
  • 提交

answer

#include <bits/stdc++.h>

#define int long long
#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
int inf=2000000007;
int mod=1000000007;
int mod1=998244353;

const int N=200007;

int a[N];
vector<int>G[N];
bool odw[N];

int ans;

void dfs(int v,int o)
{
    for(auto u:G[v])
    {
        if(u==o) continue;
        dfs(u,v);
        ans+=min(a[v],a[u]);
        ans+=max(0LL,a[v]-a[u]);
    }
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n,m,k;
    cin>>n>>m>>k;
    int mx=0,r;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        if(a[i]>mx)
        {
            mx=a[i];
            r=i;
        }
    }
    priority_queue<pair<pair<int,int>,int>>Q;
    for(int i=0;i<m;i++)
    {
        int a,b;
        cin>>a>>b;
        G[a].pb(b);
        G[b].pb(a);
    }
    Q.push({{0,a[r]},r});
    while(sz(Q)>0)
    {
        int v=Q.top().nd,w=-Q.top().st.st;
        Q.pop();
        if(odw[v]) continue;
        odw[v]=1;
        ans+=w;
        for(auto u:G[v])
        {
            Q.push({{-a[v],-a[u]},u});
        }
    }
    cout<<ans;
    return 0;
}
/*
4 3 0
2 1 3 2
1 2
2 3
3 4
*/

详细

Subtask #1:

score: 12
Accepted

Test #1:

score: 12
Accepted
time: 74ms
memory: 22100kb

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: 62ms
memory: 22356kb

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: 68ms
memory: 17348kb

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: 72ms
memory: 17280kb

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: 76ms
memory: 17264kb

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: 79ms
memory: 17280kb

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: 8212kb

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: 44ms
memory: 16280kb

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: 83ms
memory: 22580kb

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: 78ms
memory: 23816kb

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: 72ms
memory: 23044kb

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: 51ms
memory: 16280kb

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: 47ms
memory: 16304kb

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: 43ms
memory: 16508kb

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: 48ms
memory: 16220kb

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: 138ms
memory: 17300kb

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: 144ms
memory: 17464kb

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: 152ms
memory: 17332kb

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: 162ms
memory: 17656kb

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: 143ms
memory: 18232kb

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: 147ms
memory: 22364kb

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: 146ms
memory: 23836kb

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: 143ms
memory: 25992kb

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: 143ms
memory: 26504kb

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: 124ms
memory: 17144kb

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: 132ms
memory: 18340kb

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: 137ms
memory: 22404kb

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: 150ms
memory: 25040kb

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: 163ms
memory: 25148kb

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: 137ms
memory: 18704kb

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: 166ms
memory: 25004kb

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: 26148kb

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: 147ms
memory: 25416kb

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: 148ms
memory: 24876kb

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: 148ms
memory: 19392kb

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: 128ms
memory: 21676kb

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: 138ms
memory: 20596kb

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: 156ms
memory: 23024kb

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: 163ms
memory: 23996kb

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: 176ms
memory: 17592kb

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: 169ms
memory: 17976kb

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: 180ms
memory: 17596kb

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: 172ms
memory: 18020kb

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: 171ms
memory: 18124kb

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: 171ms
memory: 17596kb

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: 166ms
memory: 18708kb

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: 131ms
memory: 17512kb

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: 154ms
memory: 17632kb

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: 156ms
memory: 17640kb

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: 0
Wrong Answer

Dependency #3:

100%
Accepted

Test #50:

score: 0
Wrong Answer
time: 159ms
memory: 17656kb

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:

100825920929487

result:

wrong answer 1st numbers differ - expected: '99971599939328', found: '100825920929487'

Subtask #5:

score: 0
Wrong Answer

Test #85:

score: 0
Wrong Answer
time: 2ms
memory: 8228kb

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:

0%