QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#562190#3312. Arithmetic Progressionsyzkkai#AC ✓1316ms162936kbC++201.1kb2024-09-13 15:33:402024-09-13 15:33:40

Judging History

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

  • [2024-09-13 15:33:40]
  • 评测
  • 测评结果:AC
  • 用时:1316ms
  • 内存:162936kb
  • [2024-09-13 15:33:40]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using LL = long long;
using pii = pair<int, int>;
#define sz(x) (signed)size(x)

void solve() {
    int n;
    cin >> n;
    
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];

    vector dp(5005, vector<int>(5005));
    
    sort(a.begin(), a.end());
    
    vector<vector<int>> dis(n);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < i; j++) {
            dis[i].push_back(a[i] - a[j]);
        }
        sort(dis[i].begin(), dis[i].end());
        dis[i].push_back(INT_MAX);
    }
    
    int res = 0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < i; j++) {
            int d = a[i] - a[j];
            int k1 = lower_bound(dis[i].begin(), dis[i].end(), d) - dis[i].begin();
            int k2 = lower_bound(dis[j].begin(), dis[j].end(), d) - dis[j].begin();
            dp[i][k1] = max(dp[i][k1], 1 + (dis[j][k2] == d ? dp[j][k2] : 0));
            res = max(res, dp[i][k1]);
        }
    }
    cout << res + 1 << '\n';
}

signed main() {
    cin.tie(0)->sync_with_stdio(0);

    solve();
}

詳細信息

Test #1:

score: 100
Accepted
time: 8ms
memory: 101304kb

input:

6
0 1 3 5 6 9

output:

4

result:

ok single line: '4'

Test #2:

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

input:

7
1 4 7 3 2 6 5

output:

7

result:

ok single line: '7'

Test #3:

score: 0
Accepted
time: 8ms
memory: 101432kb

input:

5
1 2 4 8 16

output:

2

result:

ok single line: '2'

Test #4:

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

input:

2
0 1

output:

2

result:

ok single line: '2'

Test #5:

score: 0
Accepted
time: 12ms
memory: 101352kb

input:

2
1000000000 999999999

output:

2

result:

ok single line: '2'

Test #6:

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

input:

2
0 1000000000

output:

2

result:

ok single line: '2'

Test #7:

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

input:

2
841313462 5910137

output:

2

result:

ok single line: '2'

Test #8:

score: 0
Accepted
time: 8ms
memory: 101300kb

input:

97
93 77 11 27 2 71 53 70 16 61 40 56 80 3 6 79 89 36 63 24 62 12 67 0 46 9 85 65 5 96 26 10 83 30 23 28 37 69 58 54 51 42 60 95 15 32 38 18 13 19 73 34 75 94 87 44 4 57 22 82 59 1 25 43 45 48 14 35 84 91 29 64 88 86 90 74 31 78 21 49 66 20 41 7 81 50 8 92 47 76 33 39 68 17 72 52 55

output:

97

result:

ok single line: '97'

Test #9:

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

input:

96
999999954 999999933 1000000000 999999981 999999919 999999982 999999931 999999923 999999998 999999949 999999910 999999914 999999953 999999962 999999977 999999974 999999983 999999989 999999930 999999987 999999969 999999980 999999955 999999925 999999988 999999976 999999994 999999942 999999972 999999...

output:

96

result:

ok single line: '96'

Test #10:

score: 0
Accepted
time: 8ms
memory: 101428kb

input:

74
999999992 999999995 999999972 999999975 999999996 999999976 999999971 2 16 999999969 12 29 24 11 30 999999985 999999974 35 18 999999977 17 999999970 999999993 20 27 999999994 999999986 25 999999964 7 14 22 13 999999998 36 999999987 999999982 999999967 999999980 999999984 33 31 10 15 999999968 26 ...

output:

37

result:

ok single line: '37'

Test #11:

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

input:

88
676 677 667 669 668 689 692 686 694 680 693 731 654 688 673 716 744 684 655 718 746 697 698 660 717 687 656 706 709 712 700 742 657 675 737 663 733 702 662 652 732 711 726 678 696 739 741 690 730 735 745 708 681 721 724 723 736 734 727 725 695 670 740 691 672 661 699 713 722 679 671 683 664 705 6...

output:

26

result:

ok single line: '26'

Test #12:

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

input:

74
148908974 9212162 362248598 682949334 448074093 549094549 374877122 925948383 173204924 891472289 200836881 727681806 972327982 848914706 154334019 711046115 707054125 179681274 957008398 254798194 856975180 629598247 434086064 175872190 383078399 141014488 455034757 225206360 54998546 262339846 ...

output:

2

result:

ok single line: '2'

Test #13:

score: 0
Accepted
time: 12ms
memory: 101428kb

input:

75
1710982 516558 2009588 1412376 1520960 2145318 2118172 82222 190806 1683836 217952 1249500 2063880 1792420 1602398 1928150 923748 2199610 625142 1303792 55076 543704 1168062 1493814 896602 489412 2172464 733726 570850 1765274 299390 1738128 272244 1629544 869456 1819566 245098 353682 842310 10594...

output:

30

result:

ok single line: '30'

Test #14:

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

input:

829
1231 1230 882 1047 618 652 771 490 1066 1032 1041 569 1146 1097 1256 714 1241 653 646 1159 873 502 859 947 692 1105 1237 852 1060 842 869 1039 536 1163 1001 827 1263 473 450 453 610 994 1083 829 437 584 679 1053 1174 462 966 876 1052 664 1100 918 875 1029 970 811 686 1200 959 488 960 863 806 111...

output:

179

result:

ok single line: '179'

Test #15:

score: 0
Accepted
time: 19ms
memory: 102992kb

input:

749
380 473 638 583 355 249 131 424 194 808 831 518 655 237 801 759 339 175 288 552 633 196 168 299 485 195 481 723 116 546 421 648 832 382 487 848 563 791 778 114 243 752 430 574 455 657 95 439 244 307 512 463 581 457 379 422 717 716 152 103 371 283 684 349 550 814 284 133 170 348 725 573 672 765 2...

output:

233

result:

ok single line: '233'

Test #16:

score: 0
Accepted
time: 28ms
memory: 103744kb

input:

978
691 812 276 699 751 1030 322 851 475 194 298 393 798 396 206 530 450 1066 501 933 661 289 621 899 434 698 525 820 682 534 257 596 958 681 1108 348 302 720 848 1107 516 418 904 446 272 865 149 950 1117 1029 466 555 755 566 655 846 411 287 869 548 467 779 729 799 152 486 742 368 564 749 1048 402 2...

output:

143

result:

ok single line: '143'

Test #17:

score: 0
Accepted
time: 36ms
memory: 103676kb

input:

985
1390 1907 1214 1281 969 944 1783 1802 1446 1675 1386 1003 1466 1848 1303 1457 1372 1424 1154 1821 1849 987 977 1684 1798 896 915 1076 1603 1757 1455 1051 1088 1717 1223 1865 1022 985 1886 1765 1295 931 1136 1638 945 1689 1645 1667 1735 1688 1571 1025 1715 1366 1237 1780 1128 1630 1403 1014 1377 ...

output:

157

result:

ok single line: '157'

Test #18:

score: 0
Accepted
time: 24ms
memory: 103516kb

input:

868
430 658 1107 1015 1074 723 558 521 571 966 731 1140 674 590 1271 1147 478 520 745 919 762 1100 568 870 431 713 628 1030 837 1052 1236 963 951 445 849 1167 374 965 1148 379 1016 880 990 693 1237 756 860 1073 428 820 760 886 402 556 926 1122 848 1024 616 496 932 749 1187 1032 900 720 1116 1023 396...

output:

111

result:

ok single line: '111'

Test #19:

score: 0
Accepted
time: 23ms
memory: 103108kb

input:

822
282062472 527507411 527507495 247240849 527507331 527507599 167078572 527507650 527507363 88180626 325104755 527507470 527507492 527507313 166983764 205972469 527507620 527507386 182771610 150071104 527507360 61403598 153327457 231970923 527507549 527507317 527507444 282222834 527507367 52750747...

output:

411

result:

ok single line: '411'

Test #20:

score: 0
Accepted
time: 16ms
memory: 102868kb

input:

761
668660501 307386986 307386976 307387017 307386831 702512028 307386858 307386842 755622355 307386764 307386949 307387125 307387122 307386994 856354419 307387124 714592752 735520183 725522488 307386946 307387039 307386982 552180076 837326334 615021366 307387048 307387119 558393335 307386850 792757...

output:

381

result:

ok single line: '381'

Test #21:

score: 0
Accepted
time: 35ms
memory: 103744kb

input:

947
803 563 552 349 73 1006 755 290 543 314 417 883 216 52 171 987 548 914 854 17 866 449 769 668 606 877 404 90 550 230 478 354 896 252 22 35 1027 603 800 413 445 689 580 285 259 602 114 462 690 113 620 721 407 757 274 222 904 1034 1001 480 900 643 993 370 25 1028 523 431 951 144 911 149 630 1018 8...

output:

521

result:

ok single line: '521'

Test #22:

score: 0
Accepted
time: 19ms
memory: 102880kb

input:

759
396 579 45 247 571 210 521 756 357 251 380 588 464 340 592 747 705 85 884 854 661 80 178 413 138 383 875 145 648 203 687 106 738 675 883 262 7 290 230 836 154 748 412 150 167 899 491 764 438 352 77 120 128 30 765 114 550 678 615 522 461 73 261 876 816 627 34 81 24 449 880 325 636 387 130 831 565...

output:

302

result:

ok single line: '302'

Test #23:

score: 0
Accepted
time: 56ms
memory: 106056kb

input:

1295
35643 31464 55302 29141 28896 37992 50754 40142 31291 40707 37257 48555 42589 25717 58432 24936 28213 21806 31487 29360 34839 41782 27455 27576 36303 56305 39459 30193 14520 32882 36917 39384 17356 34277 30487 42001 51342 45497 36378 37600 17503 34862 34937 27429 25766 20290 35522 40485 32392 2...

output:

37

result:

ok single line: '37'

Test #24:

score: 0
Accepted
time: 41ms
memory: 103988kb

input:

1000
984579 1451879 397435 700324 1068562 700977 1080361 1478190 792362 861180 370471 914455 968383 517090 765209 1501410 807716 673171 849381 1225485 450899 789082 956773 746575 996000 616616 1282882 1080172 619896 1003213 282366 1071842 624482 1098342 979993 1471166 926065 1282229 1034110 715214 5...

output:

10

result:

ok single line: '10'

Test #25:

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

input:

802
45858 188609 42286 27993 21145 24144 5752 6349 46438 17296 185644 13915 33203 131950 91248 84524 59475 36154 33344 90730 2164 45668 99685 91639 112228 43924 930403 70786 22570 126323 48278 47911 23677 223187 20937 19757 225808 42728 116615 643426 166214 185819 26498 78711 153415 42944 84869 5769...

output:

30

result:

ok single line: '30'

Test #26:

score: 0
Accepted
time: 19ms
memory: 102580kb

input:

720
65603 30912 19847 38012 78990 83985 26486 22060 8524 62413 81393 80065 13888 17634 145716 5870 17764 22766 14910 57887 15504 16094 179549 71319 34000 5748 28670 22877 39529 66407 54203 5864 9035 30784 9090 78649 24206 283547 31865 35414 58913 246012 26402 161718 8896 23656 632900 13454 20114 686...

output:

29

result:

ok single line: '29'

Test #27:

score: 0
Accepted
time: 24ms
memory: 103372kb

input:

922
3533 96386 1396 136027 19523 56535 119681 3157 63410 86402 35415 34626 123342 132714 42296 51348 31478 54691 30720 85568 67828 160709 14508 8440 112700 46926 33087 24228 80496 13648 25460 19736 98653 73764 34255 61898 60363 20767 1924 41610 74445 41653 33927 8642 26394 14220 20558 61225 35077 46...

output:

29

result:

ok single line: '29'

Test #28:

score: 0
Accepted
time: 23ms
memory: 103276kb

input:

845
13388 142796 85055 16648 11671 19329 120460 6244 174765 62762 15424 27645 98823 35438 128742 33892 29926 106855 70354 16624 17066 59685 74205 42817 155309 122083 24304 44444 32578 42670 72919 92766 62732 33087 115125 206095 55044 54160 184873 13799 112318 5505 42152 3324 42628 9901 40827 64121 2...

output:

29

result:

ok single line: '29'

Test #29:

score: 0
Accepted
time: 25ms
memory: 103640kb

input:

975
31218 80073 44799 19073 14110 70455 103248 21517 36592 95111 10713 88947 67373 26808 37419 44367 74836 118328 121276 45610 68146 26194 62018 52495 27562 157582 129067 208294 54116 9592 11891 64444 9810 34036 90128 102551 10220 144623 56008 115054 26480 53754 98772 77007 20386 49961 23601 9313 35...

output:

30

result:

ok single line: '30'

Test #30:

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

input:

735
38892 157270 24049 60501 25974 52215 88369 152284 52420 48701 55962 123170 56017 7253 11199 43585 86608 68333 87182 41369 74934 55529 55720 22450 22921 15775 46481 2985 11893 321727 48592 136712 50454 178711 25986 19525 12526 130587 42369 44406 100176 28610 65142 18638 9245 59709 156764 47521 25...

output:

29

result:

ok single line: '29'

Test #31:

score: 0
Accepted
time: 32ms
memory: 102840kb

input:

781
19694 147168 176250 95248 83698 32575 23490 111500 17415 9505 239782 15411 64599 24097 57302 36075 10585 20690 31723 60471 30683 40320 67766 9410 108512 197623 897331 39519 64201 165219 40293 31034 167174 148652 31953 48849 12095 21488 145352 23326 23458 3431 92021 238128 25537 30225 75747 59906...

output:

30

result:

ok single line: '30'

Test #32:

score: 0
Accepted
time: 19ms
memory: 102888kb

input:

788
18352 68942 2736 25919 19244 98039 41212 69495 10405 1660 47379 32707 72122 49717 48485 146510 30449 9404 89355 20060 5987 94556 41999 5475 45297 19992 57446 579583 696249 22524 8219 26019 78899 18485 93987 47960 75234 141371 36699 11610 125403 46741 92574 193739 52572 31006 31049 26381 168776 3...

output:

30

result:

ok single line: '30'

Test #33:

score: 0
Accepted
time: 38ms
memory: 103388kb

input:

912
38085 5083 67118 177257 15825 1065 31572 58535 73664 134545 117230 79098 512366 102608 40408 43720 143766 74883 55391 80409 95956 43509 14970 125869 70967 98936 9219 8488 10733 184374 33510 23649 100006 32838 42554 12670 8540 49969 25330 93495 29186 106533 81831 144099 7469 62916 91906 14944 185...

output:

30

result:

ok single line: '30'

Test #34:

score: 0
Accepted
time: 22ms
memory: 103148kb

input:

853
30379 1841 36533 54417 95893 38678 68871 110347 796272 101644 36910 89630 39537 18649 43487 11593 162385 40066 104761 59508 45237 24510 28413 127259 20078 143627 52976 124020 259855 188422 43661 15429 28753 207882 57289 2793 91440 82216 44543 114702 51755 134248 121738 76561 85895 166758 81722 1...

output:

30

result:

ok single line: '30'

Test #35:

score: 0
Accepted
time: 27ms
memory: 103100kb

input:

838
367843 632393 1173703 1452498 626288 1165563 978343 349528 357668 880663 764668 1161493 249813 1712978 1153353 1550178 522503 884733 1002763 968168 1242893 437033 719898 160273 888803 359703 402438 949853 886768 133818 1515583 553028 874558 1491163 713793 345458 449243 1590878 1702803 491978 134...

output:

838

result:

ok single line: '838'

Test #36:

score: 0
Accepted
time: 36ms
memory: 104176kb

input:

1070
7932570 3041562 8175386 16830042 10308698 6076762 4151578 14124378 335898 4862682 16656602 7880538 2833434 8695706 3926106 7845850 7551002 1515290 10881050 9649626 11470746 1879514 10360730 4671898 14488602 11071834 17367706 17263642 6458330 2139674 197146 15650650 3995482 10343386 14714074 340...

output:

1045

result:

ok single line: '1045'

Test #37:

score: 0
Accepted
time: 23ms
memory: 103448kb

input:

920
18417347 50493204 125694974 11971481 107278214 23328483 40363986 3223520 75662776 30848660 31616025 20719442 118942162 7520764 3683939 16575671 6599926 130299164 121090784 136591557 3990885 87480197 96074685 66147450 17343036 90396184 24863213 18570820 107124741 131987367 119095635 38215364 6369...

output:

389

result:

ok single line: '389'

Test #38:

score: 0
Accepted
time: 25ms
memory: 103196kb

input:

822
23312 23054 69494 72719 54917 49757 14411 43436 48467 105485 58658 50660 53240 17249 92198 82007 15056 3188 70268 25505 58787 6413 28343 58013 62528 78782 27827 6155 19700 101873 63689 76460 20603 72848 12734 20474 27569 54530 102389 83297 39308 33374 77879 3704 63044 65495 104711 107162 28601 5...

output:

210

result:

ok single line: '210'

Test #39:

score: 0
Accepted
time: 36ms
memory: 103712kb

input:

931
748303 2648903 397423 10017383 10002763 8613863 6406243 4067043 3599203 412043 10119723 8686963 148883 4388683 13263023 2298023 236603 13482323 7707423 11669443 9593403 909123 265843 2824343 11260083 12765943 10397503 5733723 9315623 7824383 10148963 4286343 9140183 14008643 4315583 11757163 902...

output:

213

result:

ok single line: '213'

Test #40:

score: 0
Accepted
time: 27ms
memory: 103540kb

input:

885
775407462 1898482 228844882 97405092 504963002 663825482 343263692 858621142 204259022 8517752 836872112 644913282 15137022 828361622 693139392 742311112 374468822 447280792 421749322 21756292 437824692 643967672 876587732 127664612 719616472 293146362 767842582 5680922 732855012 395272242 83119...

output:

58

result:

ok single line: '58'

Test #41:

score: 0
Accepted
time: 35ms
memory: 103652kb

input:

945
2861459 4790282 4142135 4001573 9139895 9030569 2182076 3119156 3431516 7492196 2338256 6320846 6008486 3548651 4462304 409433 2291402 456287 8132534 4595057 5953823 2658425 8265287 4212416 9670907 3985955 5079215 706175 3173819 8952479 8210624 5149496 1815053 682748 5329103 8671355 97073 269747...

output:

29

result:

ok single line: '29'

Test #42:

score: 0
Accepted
time: 32ms
memory: 103920kb

input:

1007
29964534 1288142 34495945 23471766 98206231 119037195 2978967 109906740 17114264 116196609 36727834 68921142 81568513 5413755 78863193 40718181 26853416 65742391 104428467 107674851 122418845 130061374 40447649 56138505 88399446 8051442 91916362 56747202 112679693 95703810 19278520 5075590 1000...

output:

15

result:

ok single line: '15'

Test #43:

score: 0
Accepted
time: 27ms
memory: 103848kb

input:

921
8263440 4057132 23509512 4652906 1300780 18635650 26775502 9426276 26603230 25914142 389174 24076574 15929544 14163756 26100770 20580888 7488216 568624 18513624 12548706 18197792 23473622 26107948 24593390 10596290 26509916 5026162 27665574 22102624 22612262 28089076 14106332 2477972 27758888 18...

output:

9

result:

ok single line: '9'

Test #44:

score: 0
Accepted
time: 19ms
memory: 102592kb

input:

720
263937 479526 589614 482028 433656 506631 375276 92967 268107 512886 139254 233496 9984 90465 303135 507882 328155 321066 46263 254346 6231 97554 359847 160521 245172 258933 537072 416559 195966 38757 279366 457008 372774 180954 493287 19158 565845 119238 312309 71283 332742 213897 129246 425733...

output:

16

result:

ok single line: '16'

Test #45:

score: 0
Accepted
time: 37ms
memory: 103452kb

input:

914
16874 3175 34050 36824 36976 3479 25633 6082 17653 18033 29623 21491 8096 30440 11611 5018 17767 36482 15981 38420 25557 31219 22612 45564 13910 12884 30307 32834 23904 18223 31827 15867 26488 22042 7260 24265 3403 9768 28844 36121 22422 17425 24873 5873 31713 15601 42790 28616 42771 18603 28939...

output:

13

result:

ok single line: '13'

Test #46:

score: 0
Accepted
time: 19ms
memory: 103548kb

input:

865
721039 1143778 604912 1025815 911524 374953 294169 887197 1208956 618682 749956 436000 1012963 1079059 1153876 945031 1253479 578749 443803 692581 990013 336856 1320034 142699 18310 16015 246433 1291117 722875 277645 162436 1238332 594355 189976 1191514 179878 720580 507604 508522 15556 676516 9...

output:

9

result:

ok single line: '9'

Test #47:

score: 0
Accepted
time: 37ms
memory: 103696kb

input:

962
14673 14961 13217 18577 22425 31265 33745 9857 22929 17353 25849 26793 31777 15009 29577 30577 23713 11129 5929 28721 9025 32849 7249 9153 7593 13785 8993 18657 26025 28897 23377 22625 24297 19929 19097 10681 31241 17049 11881 19457 4545 26089 8265 14225 28145 13849 12585 8273 27697 29841 33305 ...

output:

9

result:

ok single line: '9'

Test #48:

score: 0
Accepted
time: 23ms
memory: 103396kb

input:

902
8139 23235 15163 14015 17119 9583 9747 18891 7907 10707 8183 22275 7415 8995 7607 23227 6859 17003 13351 6531 8295 12183 15719 17823 10695 11479 10271 9211 13707 18211 21491 13319 8671 22943 10511 10903 7895 20507 18471 17019 13227 7747 7383 10375 12219 23131 7299 23667 9591 6571 8171 16783 2340...

output:

8

result:

ok single line: '8'

Test #49:

score: 0
Accepted
time: 33ms
memory: 104268kb

input:

1040
2689909 764280 1021742 3249522 1977553 3206167 320058 2262362 3481638 1267198 632881 3428945 475469 2793961 2750606 3079437 1799464 2548505 232681 2659894 2559844 2874668 3154141 3144803 2424443 1693411 1389926 671567 2102282 2330396 436116 3030079 153308 2611870 483473 57927 2706584 2194328 30...

output:

11

result:

ok single line: '11'

Test #50:

score: 0
Accepted
time: 39ms
memory: 104312kb

input:

1059
12234 9170 5218 5448 11996 14820 4742 5272 6674 9354 8864 4228 5568 14098 8324 9916 12812 10882 12168 14766 3760 15378 6810 11164 14990 13630 9358 3948 10640 10692 13204 5914 5076 14292 5134 9434 8146 12200 5016 5276 15136 6836 4382 15416 4178 5358 3616 11226 6986 7444 13880 10356 6032 13710 63...

output:

8

result:

ok single line: '8'

Test #51:

score: 0
Accepted
time: 20ms
memory: 103012kb

input:

740
26894 48396 76645 10306 44652 17651 83912 41194 18132 54298 22136 84068 64386 28428 29871 54571 36878 16312 42676 68559 58367 50996 9240 34850 34304 78608 28324 68234 38854 37112 54064 26478 38477 51347 42260 9526 63554 74734 19601 64945 23878 67155 31964 11944 69417 62397 26062 26322 68962 1434...

output:

7

result:

ok single line: '7'

Test #52:

score: 0
Accepted
time: 17ms
memory: 102992kb

input:

737
128706659 125871995 18999131 125309083 28729467 94811315 14194275 98450139 113930219 22054939 119438715 58784947 84216507 121107347 106009243 124585339 76878547 50522203 98550659 139160739 35383891 70204019 75410955 115417915 82266419 21974523 100259499 77501771 53075411 55206435 1568963 4127436...

output:

6

result:

ok single line: '6'

Test #53:

score: 0
Accepted
time: 43ms
memory: 104984kb

input:

1169
9481 69464 85238 62732 86195 81817 77208 45011 45814 95787 41018 53283 56748 47585 76911 80860 60939 69211 49697 18391 55725 82224 56055 60026 55098 46595 24078 78330 13056 38290 85865 18545 73083 16433 89748 15366 63986 73996 50269 10130 93059 91805 47849 39049 10559 54757 36442 69046 94016 26...

output:

7

result:

ok single line: '7'

Test #54:

score: 0
Accepted
time: 144ms
memory: 111300kb

input:

1949
5974610 14573780 13321145 4491761 4850624 1553147 9116354 1675025 2352125 13090931 12982595 13368542 9177293 13226351 5771480 3462569 5724083 8804888 10321592 11377868 10159088 3455798 8547590 5500640 4119356 9211148 11513288 3692783 4688120 9847622 10294508 2548484 7498085 14262314 10091378 12...

output:

254

result:

ok single line: '254'

Test #55:

score: 0
Accepted
time: 392ms
memory: 125580kb

input:

3008
57919 266498 214955 221263 271976 98423 36090 228899 135856 218607 95020 223421 289323 218026 291149 58915 78088 139508 266249 120916 143492 50781 127307 276624 284924 265668 185324 93277 92530 209892 274383 271561 62733 254629 254297 185573 283596 242926 264921 189640 150962 266000 192545 1212...

output:

211

result:

ok single line: '211'

Test #56:

score: 0
Accepted
time: 818ms
memory: 142976kb

input:

4094
28507370 68629495 82192745 102896120 132950370 53572495 127214370 49539370 93365995 50614870 64387245 36543745 73110745 140508745 25549745 41084745 130799370 33705620 36573620 37350370 80609370 126168745 25370495 120910745 142450620 98534370 112784745 94919495 66657745 31524745 73200370 1362366...

output:

230

result:

ok single line: '230'

Test #57:

score: 0
Accepted
time: 1286ms
memory: 162820kb

input:

5000
2373169 12157209 4733689 13342449 2266929 9906249 13349089 16250769 13634609 12754809 2857889 6240969 12967289 11878329 3903689 16247449 3106889 9365089 13910169 4770209 5600209 4826649 1254329 16297249 8246249 5377769 12426129 6377089 13392249 9066289 8342529 9487929 11981249 6908289 13382289 ...

output:

5000

result:

ok single line: '5000'

Test #58:

score: 0
Accepted
time: 1294ms
memory: 162812kb

input:

5000
621065 442271 556679 505901 69941 142517 617789 310475 402329 16013 483095 31133 419591 26345 53813 608969 88841 592715 421733 39827 73973 507665 130799 406109 107111 278723 105473 260327 216101 428285 444287 497207 411275 381287 497459 373349 610985 442397 21431 474023 361757 13745 20171 27859...

output:

3829

result:

ok single line: '3829'

Test #59:

score: 0
Accepted
time: 1277ms
memory: 162792kb

input:

5000
667820 293852 483698 1564898 1096166 905684 260462 1005854 701210 508820 1577936 491012 301166 98600 1391906 790568 959426 766400 1332122 1315268 964196 1417346 955610 1509884 1477448 295124 1036700 831908 843674 1010942 618212 1371554 755588 1515290 1441196 1316858 1235450 910772 972782 916814...

output:

1668

result:

ok single line: '1668'

Test #60:

score: 0
Accepted
time: 1297ms
memory: 162784kb

input:

5000
6101767 15379527 2129647 6089127 7476367 7719687 14399927 6917047 1620887 9631487 14836007 10525767 11887727 10705887 14877087 3810767 2907007 7422647 6825407 10677447 11530647 5526647 2199167 14286167 15110927 11220967 4268967 11337887 7602767 9148007 2221287 14090247 6408287 14943447 8613967 ...

output:

1413

result:

ok single line: '1413'

Test #61:

score: 0
Accepted
time: 1280ms
memory: 162860kb

input:

5000
169040 74404 239250 22484 127740 96352 94995 222258 138006 21717 135646 151635 211461 138124 132696 241079 105792 22838 240312 260018 165736 8914 5256 15463 90983 59713 168096 24667 63076 28679 53400 162550 29033 126560 231344 224618 39889 4548 143906 94936 173524 106028 119185 165028 108683 15...

output:

319

result:

ok single line: '319'

Test #62:

score: 0
Accepted
time: 1286ms
memory: 162796kb

input:

5000
3128505 3029395 4074725 753605 4281360 3205175 3986835 1181835 250575 4008340 98170 5351000 2450630 3659585 2453435 5595035 3917645 3476325 1726005 5479095 4882565 1471685 3223875 3420225 3624990 3157490 2015855 4464620 25240 3394045 2564700 785395 170165 4143915 879830 4820855 3311765 4103710 ...

output:

57

result:

ok single line: '57'

Test #63:

score: 0
Accepted
time: 1316ms
memory: 162860kb

input:

5000
1025073 602817 1249577 1361449 1482593 870641 882193 596433 641577 1300497 936001 603273 125993 901649 833705 851793 333625 474985 1160809 217193 1277089 1069305 796769 1144241 712713 1059121 630937 906817 625313 606617 508881 1230729 813945 1020209 1514209 622577 44065 1479705 103497 400809 14...

output:

25

result:

ok single line: '25'

Test #64:

score: 0
Accepted
time: 1297ms
memory: 162812kb

input:

5000
525621 5807201 5887565 4259289 5829645 4029781 3249309 351137 1417589 8124725 3940005 94117 10168577 1935973 1609449 2069189 10378537 8435321 791329 6759985 3158809 6368301 9642229 4695137 10424149 4343997 3722081 5713081 6145309 5183837 5272165 7627337 1518949 4121729 1604381 6442873 6266941 3...

output:

16

result:

ok single line: '16'

Test #65:

score: 0
Accepted
time: 1255ms
memory: 162936kb

input:

5000
10370848 172815052 32698660 40153900 144999004 142353868 114432520 105633652 51147220 172296976 115367584 624280 197674276 32496484 65649136 165288208 66558928 52638268 60990664 139759276 155701696 69953800 158338408 24544228 188904892 18449464 78116656 63088240 41510164 66647380 166054792 1188...

output:

7

result:

ok single line: '7'

Test #66:

score: 0
Accepted
time: 1199ms
memory: 162772kb

input:

5000
67486688 730468846 895044896 349309636 567403669 649460673 419313809 352955126 334659787 888483371 192992518 322183930 870363462 836325114 450996857 330032101 477296077 145105072 657557824 882454925 477361489 456179797 185696771 74421534 746794845 272544755 244823888 91330266 835919843 63675961...

output:

3

result:

ok single line: '3'