QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#831221#3306. Alchemyucup-team2172#AC ✓4ms6192kbC++231.3kb2024-12-25 11:53:302024-12-25 11:53:30

Judging History

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

  • [2024-12-25 11:53:30]
  • 评测
  • 测评结果:AC
  • 用时:4ms
  • 内存:6192kb
  • [2024-12-25 11:53:30]
  • 提交

answer

#include <bits/stdc++.h>
#define inf (0x7f7f7f7f)
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) < (b) ? (a) : (b))
typedef long long ll;
using namespace std;
template <class T>
inline void read(T &x){
    int ch = 0, f = 0; x = 0;
    for(; !isdigit(ch); ch = getchar()) if(ch == '-') f = 1;
    for(; isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
    if(f) x = -x;
}
const int N = 1e5 + 5;
int n, a[N * 100];
ll sum;
bool check(int x){
    ll all = 0;
    for(int i = x; i < n; i++) all += a[i];
    ll need = 1;
    for(int i = x - 1; i >= 1; i--){
        if(a[i] >= need){
            all += a[i] - need;
        }
        else{
            need += need - a[i];
            if(need > sum) return false;
        }
    }
    return (a[0] + all >= need); 
}
int main(){
    read(n);
    for(int i = 0; i < n; i++){
        read(a[i]);
        sum += a[i];
    }
    if(sum == 1){
        int ans = 1;
        for(int i = 0; i < n; i++){
            if(a[i]) ans = max(ans, i);
        }
        printf("%d", ans);
        return 0;
    }
    int l = 0, r = 1e7, ans = 0;
    while(l <= r){
        int mid = (l + r) >> 1;
        if(!check(mid)) r = mid - 1;
        else l = mid + 1, ans = mid;
    }
    assert(ans != (int) 1e7);
    printf("%d", ans);
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3832kb

input:

1
1

output:

1

result:

ok single line: '1'

Test #2:

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

input:

2
0 1

output:

1

result:

ok single line: '1'

Test #3:

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

input:

6
1 0 0 0 0 1

output:

2

result:

ok single line: '2'

Test #4:

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

input:

5
0 0 0 0 1

output:

4

result:

ok single line: '4'

Test #5:

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

input:

5
1 0 1 0 1

output:

3

result:

ok single line: '3'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3900kb

input:

37720
451489069 134056336 620111578 342027410 502394496 867334619 610344031 578827762 547285146 267992868 980119426 496668202 432397098 278008842 790299797 27195229 983722405 177368018 498316364 787982913 98623319 974381888 186181726 669284760 932969833 209389252 84919178 953916913 910171707 4407773...

output:

37735

result:

ok single line: '37735'

Test #7:

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

input:

20243
471684350 97875871 557768760 955640662 518134695 999433988 49418001 188859938 824647213 917716596 87612792 972935058 881415865 792871180 604982299 37698696 822908242 851904620 788441983 322982867 23448976 589236644 778829887 739523914 576565037 597334056 513285189 891913234 928416035 649332462...

output:

20260

result:

ok single line: '20260'

Test #8:

score: 0
Accepted
time: 3ms
memory: 6104kb

input:

68040
90505946 57877510 356650756 172607034 771055813 371577414 620115877 414312295 627264104 457909314 378686562 309478575 273752740 820954532 925010598 279152164 302713418 746578406 787352631 978104601 447427926 775531762 116467407 741031346 102835428 397692660 360174034 477922374 804312397 969215...

output:

68054

result:

ok single line: '68054'

Test #9:

score: 0
Accepted
time: 3ms
memory: 5900kb

input:

83070
349270952 373104573 109714481 883425092 444248073 424905064 893234764 40964652 750759543 316819034 32137153 703784002 78143646 644304245 479263336 271443557 95967765 791541745 649271038 9970850 189399642 437640630 934232328 438600222 801788492 497159363 995733438 891340511 839311767 906675608 ...

output:

83085

result:

ok single line: '83085'

Test #10:

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

input:

26123
87499059 233777348 444025501 177369497 140502510 116473222 987688171 544578487 858651646 838885891 76104981 965015284 793517656 485590909 817104199 127655175 266488977 564662576 861543 278584251 647033753 49206841 269861281 30201183 683439228 896250024 201338509 517042221 827668311 686174208 8...

output:

26138

result:

ok single line: '26138'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3880kb

input:

36259
979955964 680906817 732416206 412485583 677742989 913611237 358823065 940503477 928055199 14823456 303778519 571205278 811477984 793243336 33664365 763222734 117474280 193489119 667480768 694928334 46560552 467438130 232472715 314128463 610295243 758112357 853007777 226615593 605118089 8941993...

output:

36275

result:

ok single line: '36275'

Test #12:

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

input:

59939
913941792 731809871 234033465 954142423 658432556 923331426 783958634 566845968 240538930 547643209 838229144 570743299 155840442 53114721 342085097 806744336 461436996 576445332 169759848 82416077 40431249 622845851 649520320 499599576 713284575 370075728 18735228 337328566 87928999 208422188...

output:

59954

result:

ok single line: '59954'

Test #13:

score: 0
Accepted
time: 3ms
memory: 3980kb

input:

73127
465807442 832592763 381344481 711931552 159013489 898516120 965813726 996194134 330061240 971258158 214762353 931405941 618807240 735422055 923313987 341520858 825821414 360083087 724331448 39803522 855712285 589525212 268417192 955111987 275203632 468176783 10649094 787140264 175640478 187276...

output:

73143

result:

ok single line: '73143'

Test #14:

score: 0
Accepted
time: 3ms
memory: 4000kb

input:

77005
449304637 38007799 889083256 83745902 549969802 86897209 130551981 116833829 20522672 204371220 315688503 4003719 931372427 794663584 486071471 269492142 438275745 826589859 944741224 355511630 502749656 834877747 61762338 95845073 507257358 284412402 313749743 82282595 474153500 956117653 271...

output:

77019

result:

ok single line: '77019'

Test #15:

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

input:

13454
844101222 711742144 2594160 541651193 350029724 595484153 386926362 932825857 306116016 349726918 307074801 644823399 713361920 755173375 927797852 394962845 409193162 143234244 791603866 393232109 546140486 66338289 408980418 739949304 703149512 642990808 855263826 199591470 57632129 62737947...

output:

13472

result:

ok single line: '13472'

Test #16:

score: 0
Accepted
time: 3ms
memory: 4196kb

input:

80165
765847842 446927338 396255551 79513967 597770415 770119890 905504129 138555051 317998978 676346079 928351665 472101182 283561537 146109126 112181040 683888680 199699113 992330553 845776934 102391223 642305376 513634450 597653755 700113721 57081624 600784491 947124400 516173790 290135412 239881...

output:

80180

result:

ok single line: '80180'

Test #17:

score: 0
Accepted
time: 2ms
memory: 4068kb

input:

95488
632295132 765126528 978746217 513281748 84410794 403208442 631730041 929907455 25453717 131474754 847425478 507889027 2619819 920443788 521466274 259182518 342900106 931460921 7373347 58086208 549667713 106153359 970750360 601331403 187092482 767217103 284807875 806387751 698594642 492138047 2...

output:

95503

result:

ok single line: '95503'

Test #18:

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

input:

4135
229410081 309642041 10232723 565398325 626334960 658207244 23084002 867317253 263987203 685644398 764004540 583019368 936875112 793632019 311942179 535442109 451980170 162614489 415685277 645182251 824615127 378199013 440304378 384195078 445972766 386098769 244433065 657737271 42477899 48760956...

output:

4154

result:

ok single line: '4154'

Test #19:

score: 0
Accepted
time: 4ms
memory: 6120kb

input:

98338
801499279 222534631 103009011 81002853 363878649 924642076 342906177 539374654 86770053 349375693 966293639 730589566 630538661 162225981 267697382 554848492 930617183 983537111 63212417 621843756 308769925 156217183 346334148 157125934 973124817 797803494 77850468 584194665 256903327 84921741...

output:

98352

result:

ok single line: '98352'

Test #20:

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

input:

31223
476604681 723015685 674485267 665771556 528992710 84543500 487814499 910435602 153237934 936353330 224963587 280666540 196399725 160614717 478774794 655479074 164546558 578451013 333714220 373546036 72555651 610519236 661203262 587517698 573273048 43252107 359179067 254677141 236545716 1603323...

output:

31239

result:

ok single line: '31239'

Test #21:

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

input:

94938
732280696 690086691 818470259 216829904 43652354 98351488 227559858 441208323 301737952 40059784 887066602 182648060 584296763 837205461 568252142 212143801 927503336 24703586 263033951 728698842 399707846 727897322 348378485 677073299 786000896 673356058 777655628 515554175 19774986 213394644...

output:

94951

result:

ok single line: '94951'

Test #22:

score: 0
Accepted
time: 3ms
memory: 4108kb

input:

71390
847625286 263794841 202659477 381174531 578323640 52058672 707443167 34896465 648030578 352010221 227817501 415664444 437273087 564084119 542384094 127048073 18949435 488440347 575289229 884576764 411004073 389026406 276491649 637070262 890270866 923604845 8076250 197703156 763412228 3088433 5...

output:

71405

result:

ok single line: '71405'

Test #23:

score: 0
Accepted
time: 3ms
memory: 4232kb

input:

72488
357061092 664484457 146253712 609287920 16409730 948538793 78152858 648286876 13779914 565709003 112342376 970444349 733115037 198581488 697150577 223709307 572178272 233615810 649802275 115949470 267697425 229823537 636109434 612769137 684360134 406922569 810837696 263364067 111705942 6950211...

output:

72503

result:

ok single line: '72503'

Test #24:

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

input:

17522
45107459 263154136 150039348 932030621 448007003 563069292 479401083 584490193 820020175 707959410 938173049 762162779 480174831 164067542 250974922 45957697 179697979 814726338 475987358 784625066 126715268 260108428 60014379 770641520 526442496 721856087 596576217 681052166 697734179 5011342...

output:

17539

result:

ok single line: '17539'

Test #25:

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

input:

25451
290398130 46931880 673352755 103044626 286516579 654611956 981552143 837664637 86386756 525079020 336378889 838940719 793751566 476218232 785729327 542606769 775351437 520011742 887258840 630144237 984485139 370609044 779737001 774072431 158815139 448926553 83834053 792762398 925798956 8665380...

output:

25468

result:

ok single line: '25468'

Test #26:

score: 0
Accepted
time: 3ms
memory: 4192kb

input:

81341
229825763 806630602 938843569 103987819 88432464 564599743 696021348 11787953 415122600 661316424 927487254 424758157 995321253 124000598 285654655 592863254 626747271 231770619 381644215 38430165 791720635 669216040 610723160 438627923 9992568 269855666 741701266 428723934 244820016 446181712...

output:

81356

result:

ok single line: '81356'

Test #27:

score: 0
Accepted
time: 2ms
memory: 4048kb

input:

55840
297354646 310651365 126340825 173830975 787943699 961494985 140391881 12875782 66137001 206728236 420826429 180029245 715129651 281694050 641016146 872718872 731745465 479193314 627925461 754347419 848599402 947233584 766613602 813949668 491490788 745733560 30780883 229986120 728990779 5078950...

output:

55856

result:

ok single line: '55856'

Test #28:

score: 0
Accepted
time: 4ms
memory: 6132kb

input:

94988
952211012 469790818 246820155 589259164 324441092 541334707 713809682 136281846 898159684 696910788 608392746 418136433 574887356 59163855 384770845 268026463 234512904 657042773 767331444 707317214 43816353 816786507 975492401 375512492 495858696 698534543 907459341 65223784 405071496 2140034...

output:

95004

result:

ok single line: '95004'

Test #29:

score: 0
Accepted
time: 2ms
memory: 4048kb

input:

54201
929082730 366010581 243433934 682240465 500143053 896062564 734406229 826659951 817463417 936864337 825721406 366507048 263588792 244646807 294955510 737852132 459873759 560328782 693378586 41720594 268714598 564632530 533381532 508877519 413355564 258427705 571545279 46637183 873874181 145747...

output:

54217

result:

ok single line: '54217'

Test #30:

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

input:

11460
707769399 261757837 180612177 338692899 664642803 558897066 298080369 190021732 85330875 202936128 635204313 792280923 818976665 950602646 351546345 84250566 464120198 248420908 544538697 459022105 981487043 708800951 830402052 358819721 764221396 306900072 954277115 381739293 211261490 763458...

output:

11477

result:

ok single line: '11477'

Test #31:

score: 0
Accepted
time: 2ms
memory: 4060kb

input:

43402
768438251 204144383 613371208 324253934 534217096 17983529 913047124 907191392 794474678 768843101 792758053 981844051 813539 915011139 704391413 55212857 864625103 92482356 886315493 130828003 988241555 595821193 823228590 663920859 129203016 527870580 60925002 852218767 759546247 205659843 8...

output:

43416

result:

ok single line: '43416'

Test #32:

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

input:

24032
873308117 423782032 977417327 377852458 232662642 791299673 243412166 380045240 371372414 494442910 77925243 558133980 250780004 959973108 676233284 703831675 898801951 962896706 202114158 354049270 744877273 246889461 230973702 610209816 251094945 339540175 420685067 66494872 37749799 8561675...

output:

24048

result:

ok single line: '24048'

Test #33:

score: 0
Accepted
time: 3ms
memory: 4024kb

input:

70286
823410347 939899946 66126515 371505308 481126037 317780831 54540532 841896821 897955338 71640891 595598966 113028226 702701653 810278318 558085150 370474155 115468187 513706113 877035655 295946301 923799127 306399114 800038349 911183633 326925833 500279333 988025390 337047794 406418441 2577502...

output:

70302

result:

ok single line: '70302'

Test #34:

score: 0
Accepted
time: 4ms
memory: 4128kb

input:

98433
70545154 247237533 624934180 573065716 759738991 966391956 815530954 645730368 178735314 465892036 493963544 859759360 135865727 322506843 564879119 570182982 807943642 712875411 791094200 751115960 955452209 30010938 724040605 482724423 644978724 260561397 188676518 465376699 51305075 2519145...

output:

98447

result:

ok single line: '98447'

Test #35:

score: 0
Accepted
time: 3ms
memory: 4144kb

input:

81106
248255052 43559796 118222326 632303807 547913305 748143052 512900129 77245261 192886611 567164374 180323603 533759514 883545805 694756280 115798207 498933867 15560387 165670153 15715541 406855872 66947714 686210755 14439111 289599004 907016819 547018514 332039968 96370715 965890705 464041538 3...

output:

81121

result:

ok single line: '81121'

Test #36:

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

input:

26942
533392525 833551922 891464232 140309309 638427728 728572985 71150634 59491859 974249814 470604295 805346170 465479058 958758516 485069630 144543582 621007909 299879413 14849741 665400925 515174699 358369961 478589897 395371987 427603296 336084828 952357685 184557653 321787564 444839561 7066650...

output:

26958

result:

ok single line: '26958'

Test #37:

score: 0
Accepted
time: 2ms
memory: 3964kb

input:

33724
636553711 405687088 475270818 943665508 432693475 297159668 135636792 51369126 523123580 519860015 336354784 545729325 90309519 606793143 637426841 530236290 801719140 962829819 745525978 409010147 442698738 782996797 903362297 339347263 222924534 880414549 885908603 242105814 754934005 947613...

output:

33740

result:

ok single line: '33740'

Test #38:

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

input:

16484
583611049 213565074 390271274 90430488 733892343 419246162 808429129 487983464 734535089 406637849 239608227 319523298 840804071 931141014 777741605 737264056 580208827 313689848 845472560 998596082 542962992 686751146 669344747 359186804 358230253 126030432 683389621 748518370 274435124 58085...

output:

16501

result:

ok single line: '16501'

Test #39:

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

input:

7660
444543804 677673265 459936897 52388522 688882132 188735771 614781154 367009771 900787235 140927441 238118297 274858491 670901683 227806900 889511918 916803542 440282879 264041025 532621069 60815473 942618615 471694246 802577227 23387048 873633833 789973551 142595473 180422782 279528578 72935798...

output:

7678

result:

ok single line: '7678'

Test #40:

score: 0
Accepted
time: 2ms
memory: 4072kb

input:

49643
307871506 865384460 893735255 932148553 853490030 42084555 872133916 584853077 161548085 361858563 767162471 944380913 648468409 498719381 316600483 499906197 975532060 28062607 147850536 436078192 350652670 27645461 407904348 430652964 605605767 632063002 387686775 606895728 82209187 60884665...

output:

49660

result:

ok single line: '49660'

Test #41:

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

input:

75721
748933812 137505496 957511767 551335794 844639320 740965500 393660744 230335828 486965431 263934410 456265865 236663955 842272152 947940443 921399853 75127619 973202054 833686714 59081231 971543627 591908280 792251809 516550550 614400685 110869866 509649941 78232133 634180600 740959232 6675971...

output:

75736

result:

ok single line: '75736'

Test #42:

score: 0
Accepted
time: 2ms
memory: 3956kb

input:

52459
487761227 860671001 325052768 416546578 978366451 25493609 942578011 802658117 552145856 141142595 583822508 415289381 47984053 804291803 22874111 496469891 661875807 837042181 439351838 863114208 845542572 725489228 862713759 44085956 534104666 833742336 271687552 427343835 980664645 37863058...

output:

52475

result:

ok single line: '52475'

Test #43:

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

input:

3654
940168700 115215835 552519067 973515532 248011701 874413445 661322190 253230526 195926070 492021204 944741938 595633883 265115612 102609031 259408792 453368508 761413068 979621824 75814153 65168226 812168121 835363967 741906659 250851436 711685920 944079025 800603323 323327187 730928134 2379969...

output:

3674

result:

ok single line: '3674'

Test #44:

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

input:

46042
576209538 710762472 528899251 646321939 127102593 848047536 485211919 319940917 423686520 474360721 50275512 222439060 15987143 490878325 297581105 872253181 826512889 507574465 500376504 849600322 498387860 405319642 637405961 558767876 324266156 486262100 226723861 675300483 25605644 2796217...

output:

46057

result:

ok single line: '46057'

Test #45:

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

input:

82914
598399776 742595486 881723030 911176379 934001420 209303870 184461951 459269868 535654182 817856450 539544581 797926925 704298322 523954819 451109512 35648070 751773886 145999338 921161119 617492219 493110082 432726828 815205746 311962024 811448288 794698352 837475303 283737411 415499873 71302...

output:

82929

result:

ok single line: '82929'

Test #46:

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

input:

71336
691719491 541695287 49654234 870014944 975213385 289853358 189656815 415365843 831266404 269756886 460360805 34050046 57860194 987800082 16180747 576902892 32327400 934223302 16241280 313433779 795125140 376309254 526899912 829865231 477908018 161080241 409314775 371587386 399534819 905606810 ...

output:

71351

result:

ok single line: '71351'

Test #47:

score: 0
Accepted
time: 2ms
memory: 4056kb

input:

44677
317637403 789649181 195875393 386516535 345504048 572456343 602023357 609233091 637420659 926851735 528098759 194795750 489383766 79025297 373066972 185453267 787962496 977110585 405968395 655988808 413767546 574388729 787736974 776182153 848955473 849928711 860477213 24117392 623541072 285960...

output:

44692

result:

ok single line: '44692'

Test #48:

score: 0
Accepted
time: 4ms
memory: 4212kb

input:

100000
654162302 436460819 816414698 2475915 887052883 873517671 514785344 841431659 24536909 84792291 995767544 145755603 247093020 906157138 132354769 94871021 108917003 632229830 518401025 320817654 810717701 397500946 967015583 835726955 194546809 586145141 251360245 218462478 982528231 47298752...

output:

100014

result:

ok single line: '100014'

Test #49:

score: 0
Accepted
time: 4ms
memory: 4272kb

input:

100000
283994260 685621844 733981142 209589223 835531639 189786707 69739657 160922159 156589100 585254684 823218872 802292718 354535250 577721769 238090746 591985044 70900079 233381861 711290980 804571252 900230311 975701056 42984566 312354780 582696367 949389322 984577051 737461105 221293644 807791...

output:

100015

result:

ok single line: '100015'

Test #50:

score: 0
Accepted
time: 4ms
memory: 4276kb

input:

100000
930953368 171482802 550210447 360837452 280469575 499575381 76449341 475837754 474110711 804900973 950751333 335701376 295893623 66163254 115470015 611597300 707003094 791185100 695957499 983411199 324914174 206836446 398700034 891221351 103787078 421379331 574777143 28566936 717342709 648100...

output:

100012

result:

ok single line: '100012'

Test #51:

score: 0
Accepted
time: 4ms
memory: 6044kb

input:

100000
0 412572285 622298788 0 0 715923661 0 0 237438497 0 0 847748689 102469869 984460604 0 0 0 600835700 149722009 877190484 440473485 813609068 0 305021321 0 0 173745226 0 0 105420085 0 0 0 0 0 39374387 0 510532926 0 661759287 29352115 519953939 0 0 466288435 0 0 0 318202317 0 215860472 0 3847958...

output:

69

result:

ok single line: '69'

Test #52:

score: 0
Accepted
time: 3ms
memory: 4228kb

input:

100000
0 833308212 0 0 434297417 0 18058338 0 0 995456914 712254904 0 0 490128623 0 0 0 302766948 651727504 0 0 0 0 0 0 0 0 493404120 759695841 0 0 0 836615540 262123557 699870679 0 606710017 314033817 0 0 677115825 0 0 0 271107486 0 0 166990302 0 0 0 803444928 0 0 0 751126628 0 414880573 0 0 320142...

output:

62

result:

ok single line: '62'

Test #53:

score: 0
Accepted
time: 3ms
memory: 4228kb

input:

100000
0 0 0 346063491 0 985222901 0 901009956 0 776392525 0 573440084 80700190 879838934 0 0 0 0 115403118 958987730 900228213 0 0 133681223 772832511 0 0 0 417381415 0 406057209 0 0 336589272 0 987808486 923991053 834671682 0 0 93457623 0 290054674 0 0 903619580 195030341 0 711603964 177918052 0 8...

output:

81

result:

ok single line: '81'

Test #54:

score: 0
Accepted
time: 3ms
memory: 4176kb

input:

100000
654440563 0 721904065 834571996 0 0 0 320191447 0 962627220 0 800560824 0 0 993824688 403087827 0 770021235 0 9238527 0 0 0 464940092 978877630 0 908886638 834950943 0 0 570672639 0 813375287 0 0 712290060 0 887905109 242044056 0 0 308527390 0 0 880091665 0 687629431 109942958 0 0 357195169 3...

output:

77

result:

ok single line: '77'

Test #55:

score: 0
Accepted
time: 3ms
memory: 4264kb

input:

100000
791680729 0 0 0 867799637 686637411 202788451 233133824 0 928584718 552282699 0 0 240923494 182130377 0 0 0 193425931 108952165 272948083 549459648 14802910 810849400 831005063 268897152 0 483460452 389435121 824568977 0 0 0 0 642434961 0 307170825 0 884361698 0 0 0 0 0 0 752009670 0 0 764960...

output:

66

result:

ok single line: '66'

Test #56:

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

input:

100000
0 0 0 0 0 0 0 0 602603760 0 0 0 0 0 0 0 702123734 0 836742546 0 0 0 0 0 0 0 0 0 0 0 0 121323697 0 0 49295309 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 380398922 0 0 0 0 0 0 0 0 134932322 487114946 0 0 0 0 0 710567095 0 0 0 0 0 0 0 0 0 303116590 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600195190 0 0 0 0 ...

output:

47

result:

ok single line: '47'

Test #57:

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

input:

100000
644205650 0 493197333 834901387 0 0 0 0 0 0 0 0 0 0 567863848 0 0 69859952 0 0 0 0 0 0 0 0 0 924752005 0 0 0 0 0 0 0 0 0 0 0 0 0 425680112 345263955 0 313095905 0 304818847 85326985 0 0 511577747 0 0 0 0 0 0 0 0 324068812 0 0 0 0 153594924 0 984550679 745845391 0 0 0 0 0 0 0 0 392502711 84961...

output:

51

result:

ok single line: '51'

Test #58:

score: 0
Accepted
time: 2ms
memory: 4084kb

input:

100000
0 0 0 0 150999866 0 886286312 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 488739551 142003558 0 0 0 0 0 0 0 0 1532535 952897123 0 0 0 0 0 0 0 0 0 0 0 763229107 0 0 0 0 0 804874201 0 0 0 0 0 0 0 0 0 0 52825663 0 0 0 0 0 0 605774221 0 0 0 0 0 0 0 403995462 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 585442570 2584...

output:

48

result:

ok single line: '48'

Test #59:

score: 0
Accepted
time: 2ms
memory: 4220kb

input:

100000
0 0 0 0 134645243 0 0 0 0 43907416 0 0 0 471356157 0 0 0 0 0 0 0 0 367465947 0 0 0 0 0 408328845 0 0 420953042 0 0 0 0 0 819458004 0 0 0 0 0 0 0 0 0 0 490928164 0 946451071 228400155 0 0 0 0 334935285 736401628 0 0 0 0 310114790 0 0 0 641727439 0 0 0 0 0 0 670784963 0 945492419 827706090 0 0 ...

output:

47

result:

ok single line: '47'

Test #60:

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

input:

100000
0 37040578 379969166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 715640322 0 0 986529742 925498447 52875646 0 0 553572649 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 509751187 0 0 0 0 0 955352111 0 878322163 0 0 0 0 641240676 0 983409217 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

49

result:

ok single line: '49'

Test #61:

score: 0
Accepted
time: 2ms
memory: 4272kb

input:

100000
0 0 0 0 0 0 0 0 899334159 0 0 0 512420115 559860378 0 0 0 0 0 0 0 0 0 0 906152736 0 0 0 776818352 0 0 0 0 0 0 0 0 296493158 0 0 859544309 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 950215617 952662770 0 0 0 0 0 0 400467735 0 0 0 0 0 0 0 0 0 0 0 11684554 0 0 0 0 107378406 0 0 0 0 0 ...

output:

48

result:

ok single line: '48'

Test #62:

score: 0
Accepted
time: 2ms
memory: 4148kb

input:

100000
0 780520347 0 0 0 0 0 0 0 139226569 0 0 0 788930800 0 0 823114801 0 0 980429325 0 0 0 0 734063965 0 0 0 0 0 0 0 0 0 0 0 675985240 0 0 0 0 687731943 0 0 419571987 0 0 0 0 553383817 195351225 0 0 0 0 0 0 0 0 0 376547044 0 0 0 0 0 0 0 0 0 179184195 0 0 0 0 0 0 685090366 0 0 0 0 0 0 201677030 0 0...

output:

52

result:

ok single line: '52'

Test #63:

score: 0
Accepted
time: 2ms
memory: 4220kb

input:

100000
0 0 865560229 0 0 0 0 0 0 0 835860829 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 183348773 0 0 0 0 0 283618333 111883246 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 356696287 0 0 964029687 0 0 0 0 0 218886462 0 0 912713629 0 0 0 675796742 0 0 0 0 0 0 0 0 445788617 0 0 0 0 0 0 0 0 0 571381895 0 0 0...

output:

46

result:

ok single line: '46'

Test #64:

score: 0
Accepted
time: 3ms
memory: 6176kb

input:

100000
629850771 0 613761094 0 229724194 0 0 846933084 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 304635243 0 0 0 0 0 0 0 0 0 125463284 754985360 0 873606309 326639634 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 789475580 0 0 933951089 0 0 354679930 0 0 0 0 0 0 0 0 896395829 183678013 0 0 6...

output:

48

result:

ok single line: '48'

Test #65:

score: 0
Accepted
time: 2ms
memory: 4340kb

input:

100000
920097043 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 515222668 0 0 0 0 400500834 0 728737590 400829654 0 0 0 0 622243852 0 0 0 0 0 0 0 0 0 0 0 0 427295945 0 0 0 0 0 0 0 0 0 0 928071320 0 0 0 35365457 0 0 0 0 0 0 0 0 13443776 0 0 0 0 0 0 0 260586922 0 0 0 0 0 0 0 673683963 0 0 0 0 0 0 876226026...

output:

49

result:

ok single line: '49'

Test #66:

score: 0
Accepted
time: 2ms
memory: 4340kb

input:

100000
0 0 931189838 13813450 0 0 0 0 0 0 0 0 115489712 0 0 0 0 0 0 0 567185542 0 0 0 0 0 346951554 0 0 0 0 0 402488052 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 293187601 0 0 0 0 0 0 0 0 0 0 0 788103346 0 609806795 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 120727023 0 0 0 0 0 0 0 0 642583344 0 788136803 0 ...

output:

46

result:

ok single line: '46'

Test #67:

score: 0
Accepted
time: 2ms
memory: 4208kb

input:

100000
0 0 88353690 0 0 0 0 0 0 0 0 0 0 0 0 0 205052898 0 0 0 0 0 0 332700006 0 864586388 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36318550 0 336064083 0 263843199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 479128493 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 552538134 0 0 0 0 111166424 0 666628679 0 0...

output:

46

result:

ok single line: '46'

Test #68:

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

input:

100000
0 0 331081956 0 0 0 0 0 970565713 0 0 0 0 173628970 0 0 0 420772361 0 0 0 0 0 0 0 0 796126108 0 0 0 0 0 0 0 0 0 0 0 908087859 0 0 0 0 0 0 0 347332382 0 0 0 842890558 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 74036687 0 0 0 0 0 248647531 0 0 0 0 0 0 0 0 0 0 818564083 0 0 0 0 0 0 0 0 0 0 1566...

output:

47

result:

ok single line: '47'

Test #69:

score: 0
Accepted
time: 2ms
memory: 4084kb

input:

100000
444696806 0 0 0 0 0 0 0 0 0 839183255 0 0 0 0 0 0 0 624464797 0 0 0 0 0 0 0 0 0 0 0 0 200540291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 253837734 0 0 846891004 0 0 193737770 0 996153053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 921283384 913656220 0 0 0 0 0 155488094 0 0 0 0 0 0 0 638947662 0 0 0 0 0 0 0...

output:

45

result:

ok single line: '45'

Test #70:

score: 0
Accepted
time: 2ms
memory: 4216kb

input:

100000
0 0 0 0 505489442 0 0 0 704105299 0 615546139 0 515368617 0 0 0 0 0 0 0 0 0 0 0 461635114 0 0 0 0 0 0 0 702096672 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 134629591 0 0 0 0 349452602 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 139555703 53388814 0 0 0 0 0 8928615 0 706322331 0 0 0 329807603 0 ...

output:

45

result:

ok single line: '45'

Test #71:

score: 0
Accepted
time: 2ms
memory: 4148kb

input:

100000
0 0 164212376 0 36348065 0 0 623781877 0 0 0 0 128344916 0 0 966486719 0 0 0 0 500704190 0 0 0 0 0 0 0 906797424 0 0 38614557 0 0 0 65965200 174784760 0 0 0 714991060 0 0 0 0 0 0 0 0 0 0 0 0 0 689737968 0 0 0 0 0 321873282 0 416967620 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 969736373 0 0 923343376 ...

output:

50

result:

ok single line: '50'

Test #72:

score: 0
Accepted
time: 2ms
memory: 4092kb

input:

100000
0 0 0 524052824 0 0 0 0 838508749 0 0 0 0 0 29656016 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40585009 0 0 0 0 384746499 0 553786862 0 0 0 0 0 0 797625886 0 0 0 614684740 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 735872081 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 194843121 0 0 0 0 827274654 0 0 157238272 0 0 0 351375260 7032395...

output:

48

result:

ok single line: '48'

Test #73:

score: 0
Accepted
time: 2ms
memory: 4064kb

input:

100000
973405139 0 800342862 0 0 0 0 0 0 0 0 0 0 0 0 0 0 686659135 0 0 0 0 0 0 0 0 0 0 0 0 123084141 545926064 288389059 0 0 0 0 0 0 0 0 0 0 0 249831186 0 0 0 0 0 0 0 0 0 0 0 0 0 522534484 74780278 0 0 0 0 0 0 0 0 394267972 0 0 0 0 0 0 0 0 0 0 407086038 0 0 0 0 0 554761884 0 0 0 0 0 0 0 0 0 74169960...

output:

48

result:

ok single line: '48'

Test #74:

score: 0
Accepted
time: 2ms
memory: 4332kb

input:

100000
0 0 0 0 0 0 0 223000441 0 0 0 0 0 0 0 449562822 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 313033003 70607852 218354038 0 0 0 0 0 0 0 0 0 0 0 0 304192268 0 0 0 0 0 0 0 0 0 636091037 0 0 0 0 0 0 0 0 0 557270712 0 0 4408528 952740449 0 0 0 349588716 0 0 0 0 0 0 926303231 0 0 0 0 0 0 0 0 0 833161376 0 ...

output:

47

result:

ok single line: '47'

Test #75:

score: 0
Accepted
time: 2ms
memory: 4144kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 910446486 0 0 421995353 0 0 0 0 0 79722865 0 0 523105172 0 0 0 0 0 0 0 0 0 0 0 0 0 0 624376723 0 0 0 0 808608365 0 653451059 0 0 0 0 728846440 526030694 0 0 0 0 0 620208661 0 0 0 0 0 661444520 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 224114602 0 0 0 0 0 0 8408...

output:

50

result:

ok single line: '50'

Test #76:

score: 0
Accepted
time: 2ms
memory: 4228kb

input:

100000
0 0 360963313 0 0 0 0 0 0 0 0 16524231 0 0 987750620 503773765 0 0 0 0 0 290858230 0 0 0 78532594 0 0 0 0 0 0 0 0 0 0 0 0 0 0 542724053 0 0 0 0 0 0 0 0 0 0 0 0 257501250 0 0 0 0 0 0 0 0 0 0 0 0 354586861 0 0 0 0 0 120779482 727508090 0 0 0 0 0 0 0 0 0 0 0 0 0 315535331 0 0 0 0 0 0 0 0 0 0 0 0...

output:

48

result:

ok single line: '48'

Test #77:

score: 0
Accepted
time: 2ms
memory: 4264kb

input:

100000
0 0 0 0 535818399 0 0 592546042 836289868 0 0 688334634 930895023 0 0 0 0 0 0 0 23396855 0 0 0 0 0 0 0 0 653196390 0 0 0 0 0 0 0 0 0 0 96148920 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 422636021 0 0 0 0 0 0 0 0 0 965861944 0 0 0 0 0 373228838 0 784369440 0 0 0 0 0 240848287 0 0 0 0 0 0 0 0 0 0...

output:

47

result:

ok single line: '47'

Test #78:

score: 0
Accepted
time: 2ms
memory: 4336kb

input:

100000
0 178207990 0 0 0 0 0 0 0 0 0 0 0 0 137143197 0 0 0 0 0 0 0 0 0 408634549 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 786601702 0 0 0 0 293097716 0 0 0 0 0 306901223 0 0 483340033 0 0 381691294 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 218714797 0 0 0 0 0 0 0 0 0 0 0 514841104 0 0 0 0 0 7089682...

output:

44

result:

ok single line: '44'

Test #79:

score: 0
Accepted
time: 2ms
memory: 4224kb

input:

100000
283451284 0 0 0 0 0 0 0 0 0 0 0 353286228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 299820091 0 0 0 0 0 0 47008169 0 0 0 188906854 0 0 0 0 787744108 349974280 0 0 0 0 0 693240724 0 0 0 0 0 0 0 0 0 0 182198114 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 460529839 ...

output:

43

result:

ok single line: '43'

Test #80:

score: 0
Accepted
time: 2ms
memory: 4264kb

input:

100000
0 0 0 0 0 0 0 0 0 641056770 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 741018554 0 576836420 0 0 0 0 388724754 0 0 0 0 0 0 0 0 0 0 0 0 439893002 0 0 0 0 0 0 0 0 0 0 0 378629160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 409555456 0 0 0 0 256384349 0 0 0 0 0 0 0 0 0...

output:

46

result:

ok single line: '46'

Test #81:

score: 0
Accepted
time: 2ms
memory: 4216kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 850680034 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 539550077 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 224666230 32578204 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

40

result:

ok single line: '40'

Test #82:

score: 0
Accepted
time: 2ms
memory: 4212kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 503508835 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 381034648 0 0 0 0 0 206955713 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

41

result:

ok single line: '41'

Test #83:

score: 0
Accepted
time: 2ms
memory: 4336kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 183970269 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 838020257 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #84:

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

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 460451934 0 0 0 0 0 0 0 0 0 0 0 0 0 0 34545028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

40

result:

ok single line: '40'

Test #85:

score: 0
Accepted
time: 2ms
memory: 4224kb

input:

100000
0 0 0 0 0 495682641 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #86:

score: 0
Accepted
time: 2ms
memory: 4212kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 870055219 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 830404566 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #87:

score: 0
Accepted
time: 2ms
memory: 4276kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 374041364 0 340594333 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 189337127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52160612 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

42

result:

ok single line: '42'

Test #88:

score: 0
Accepted
time: 2ms
memory: 4204kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 555115608 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 280258788 827004085 0 0 251404960 0 0 0 0 0 0 0 0 0 0 0 0 468979724 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

41

result:

ok single line: '41'

Test #89:

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

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 771765426 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 412638015 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #90:

score: 0
Accepted
time: 2ms
memory: 6008kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 53561921 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

41

result:

ok single line: '41'

Test #91:

score: 0
Accepted
time: 2ms
memory: 4228kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 422839616 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #92:

score: 0
Accepted
time: 2ms
memory: 4092kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 338110390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 51055929 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

40

result:

ok single line: '40'

Test #93:

score: 0
Accepted
time: 2ms
memory: 4220kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 34501441 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 990047366 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 740254695 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

41

result:

ok single line: '41'

Test #94:

score: 0
Accepted
time: 2ms
memory: 4148kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 499633659 0 0 0 0 0 0 0 0 0 0 0 0 487047897 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 260970332 0 0 0 0 0 0 0 0 856262012 0 0 0 0 0 0 0 0 0 0 0 931501594 0 0 0 0 0 0 0 0 500672291...

output:

40

result:

ok single line: '40'

Test #95:

score: 0
Accepted
time: 2ms
memory: 4164kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 927806469 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #96:

score: 0
Accepted
time: 2ms
memory: 4224kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #97:

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

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #98:

score: 0
Accepted
time: 2ms
memory: 4220kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 402123993 0 0 0 0 0 38805915 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

40

result:

ok single line: '40'

Test #99:

score: 0
Accepted
time: 2ms
memory: 4216kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 584694058 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #100:

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

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 953843068 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 430610814 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 684898471 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

40

result:

ok single line: '40'

Test #101:

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

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #102:

score: 0
Accepted
time: 2ms
memory: 6048kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #103:

score: 0
Accepted
time: 2ms
memory: 4220kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #104:

score: 0
Accepted
time: 2ms
memory: 4332kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #105:

score: 0
Accepted
time: 2ms
memory: 4132kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

35

result:

ok single line: '35'

Test #106:

score: 0
Accepted
time: 2ms
memory: 5904kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

29

result:

ok single line: '29'