QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#467451#6670. NizPorNPtree53 62ms35160kbC++17998b2024-07-08 16:16:592024-07-08 16:16:59

Judging History

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

  • [2024-07-08 16:16:59]
  • 评测
  • 测评结果:53
  • 用时:62ms
  • 内存:35160kb
  • [2024-07-08 16:16:59]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 1e6 + 5;

int a[N], mx[N];
unsigned long long f[N], s[N], S[N];

signed main() {
    int n, res = 0; scanf("%d", &n);
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    mt19937_64 rnd;
    for (int i = 1; i <= n; ++i) f[i] = rnd(), S[i] = S[i - 1] + f[i];
    for (int i = 1; i <= n; ++i) if (a[i] == 1) {
        ++res;
        int L = i, R = i; s[i] = f[a[i]], mx[i] = a[i];
        while (L - 1 >= 1 && a[L - 1] != 1) --L, s[L] = s[L + 1] + f[a[L]], mx[L] = max(mx[L + 1], a[L]);
        while (R + 1 <= n && a[R + 1] != 1) ++R, s[R] = s[R - 1] + f[a[R]], mx[R] = max(mx[R - 1], a[R]);
        auto chk = [&](int x, int y) {
            return x <= i && i <= y && s[x] + s[y] - f[a[i]] == S[max(mx[x], mx[y])];
        };
        for (int j = L; j < i; ++j) res += chk(j, j + mx[j] - 1);
        for (int j = R; j > i; --j) res += chk(j - mx[j] + 1, j);
    }
    printf("%d\n", res);
    return 0;
}

詳細信息

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 13
Accepted
time: 58ms
memory: 35160kb

input:

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

output:

998929

result:

ok single line: '998929'

Test #2:

score: 0
Accepted
time: 62ms
memory: 35108kb

input:

990763
990763 990762 990761 990760 990759 990758 990757 990756 990755 990754 990753 990752 990751 990750 990749 990748 990747 990746 990745 990744 990743 990742 990741 990740 990739 990738 990737 990736 990735 990734 990733 990732 990731 990730 990729 990728 990727 990726 990725 990724 990723 990722...

output:

990763

result:

ok single line: '990763'

Test #3:

score: -13
Runtime Error

input:

998735
988140 666830 849895 510099 129658 604780 86344 583384 917331 770372 686521 542162 601112 972325 197506 642976 589646 677694 962319 902036 770622 373945 329490 459023 981810 280818 863168 231417 427339 191541 853228 893599 321387 119939 713001 138836 170434 822971 966309 553875 399252 294428 ...

output:


result:


Subtask #2:

score: 20
Accepted

Test #13:

score: 20
Accepted
time: 2ms
memory: 12036kb

input:

4977
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

4977

result:

ok single line: '4977'

Test #14:

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

input:

4971
2 2 2 1 1 1 2 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 1 1 2 1 1 2 2 2 1 1 2 1 1 2 1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 1 1 1 1 2 2 1 2 1 2 2 1 2 1 2 1 1 1 2 2 2 1 1 1 2 2 2 2 2 1 1 1 2 1 1 1 1 1 2 1 1 2 1 1 1 2 1 1 2 2 1 2 1 1 1 2 1 2 2 2 1 2 2 1 2 1 1 2 1 2 2 1 1 2 1 2 2 1 2 1 2 2 2 1 2 2 2 2 1 1 1 2 2 1 1...

output:

4921

result:

ok single line: '4921'

Test #15:

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

input:

4972
2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...

output:

7457

result:

ok single line: '7457'

Test #16:

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

input:

4978
1 8 9 3 2 6 6 9 5 9 1 2 1 3 3 1 1 5 7 1 2 5 5 7 3 3 4 7 5 6 10 1 8 6 10 3 5 5 6 3 4 7 6 5 3 2 5 6 8 8 9 4 3 3 9 4 8 10 1 10 2 7 4 10 9 9 4 4 5 1 5 7 8 6 8 4 1 3 4 5 6 5 8 3 7 3 3 5 7 9 7 6 9 3 9 3 4 5 1 3 8 3 1 6 9 1 7 5 5 4 4 8 6 8 5 7 9 7 4 4 9 7 5 4 6 6 9 4 6 5 2 1 4 3 9 10 4 3 1 7 5 7 1 8 6...

output:

653

result:

ok single line: '653'

Test #17:

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

input:

4999
91 55 18 98 86 72 61 70 60 22 15 98 23 1 70 26 91 44 64 78 1 20 58 87 37 99 61 17 40 60 82 1 62 39 27 5 65 96 82 44 2 95 4 79 95 87 45 18 45 8 7 61 18 17 87 74 85 41 93 53 88 94 84 53 27 11 4 16 23 55 22 53 19 64 32 41 25 65 38 40 64 63 23 77 14 18 58 38 36 51 47 69 36 26 9 56 26 63 5 90 93 37 ...

output:

40

result:

ok single line: '40'

Test #18:

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

input:

4961
56 871 832 207 364 919 980 489 90 612 397 766 355 519 487 297 991 188 809 81 650 739 820 442 243 159 765 880 111 275 205 415 120 297 878 629 524 580 493 600 732 266 15 285 94 254 827 328 834 145 893 166 959 964 562 961 91 189 996 25 478 205 685 700 844 780 617 23 564 578 369 2 691 516 817 640 9...

output:

3

result:

ok single line: '3'

Test #19:

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

input:

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

output:

4995

result:

ok single line: '4995'

Test #20:

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

input:

4953
4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 4941 4940 4939 4938 4937 4936 4935 4934 4933 4932 4931 4930 4929 4928 4927 4926 4925 4924 4923 4922 4921 4920 4919 4918 4917 4916 4915 4914 4913 4912 4911 4910 4909 4908 4907 4906 4905 4904 4903 4902 4901 4900 4899 4898 4897 4896 4895 ...

output:

4953

result:

ok single line: '4953'

Test #21:

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

input:

4994
2576 2750 4180 2695 4302 4893 397 4522 1471 1131 1844 1578 3865 4104 282 1290 2729 2139 1860 2542 4012 4233 882 2915 65 4547 3283 3976 1661 605 1862 3902 3524 2368 4822 21 1575 3587 3762 515 560 170 3554 2589 3205 3517 4262 1659 3170 1646 609 3922 2507 2546 2171 4946 755 4932 1248 2634 3017 309...

output:

2

result:

ok single line: '2'

Test #22:

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

input:

4950
2475 2474 2473 2472 2471 2470 2469 2468 2467 2466 2465 2464 2463 2462 2461 2460 2459 2458 2457 2456 2455 2454 2453 2452 2451 2450 2449 2448 2447 2446 2445 2444 2443 2442 2441 2440 2439 2438 2437 2436 2435 2434 2433 2432 2431 2430 2429 2428 2427 2426 2425 2424 2423 2422 2421 2420 2419 2418 2417 ...

output:

4950

result:

ok single line: '4950'

Test #23:

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

input:

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

output:

4990

result:

ok single line: '4990'

Test #24:

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

input:

4959
2479 2478 2477 2476 2475 2474 2473 2472 2471 2470 2469 2468 2467 2466 2465 2464 2463 2462 2461 2460 2459 2458 2457 2456 2455 2454 2453 2452 2451 2450 2449 2448 2447 2446 2445 2444 2443 2442 2441 2440 2439 2438 2437 2436 2435 2434 2433 2432 2431 2430 2429 2428 2427 2426 2425 2424 2423 2422 2421 ...

output:

4959

result:

ok single line: '4959'

Test #25:

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

input:

4957
1707 544 969 1762 1776 1369 1806 1848 2314 634 407 1653 240 628 211 2133 57 946 455 254 1993 557 272 277 111 52 961 1903 1164 671 348 1368 861 2332 1858 127 1385 89 2043 369 2184 1582 789 581 825 1942 1596 1973 890 268 312 1902 179 48 1043 2284 1244 2151 1795 1710 1468 75 1257 624 1450 1149 864...

output:

2481

result:

ok single line: '2481'

Test #26:

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

input:

4989
4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 4941 4940 4939 4938 4937 4936 4935 4934 4933 4932 4931 ...

output:

4989

result:

ok single line: '4989'

Test #27:

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

input:

4976
4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 4941 4940 4939 4938 4937 4936 4935 4934 4933 4932 4931 4930 4929 4928 4927 4926 4925 4924 4923 4922 4921 4920 4919 4918 ...

output:

2490

result:

ok single line: '2490'

Test #28:

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

input:

4993
4063 895 2954 273 556 1806 4088 1376 4627 2647 126 1529 4106 1521 3595 559 1060 1249 4357 4582 164 1320 2508 3585 2752 4323 4916 4030 2110 1053 4163 836 3525 235 3869 198 584 1001 1817 4986 4112 1862 1295 3798 438 2365 4809 2546 1368 4719 1140 548 2386 2323 1730 708 1850 2689 3637 1494 1751 268...

output:

0

result:

ok single line: '0'

Test #29:

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

input:

4961
4961 4959 4957 4956 4954 4950 4948 4943 4941 4938 4937 4934 4933 4931 4925 4923 4922 4920 4919 4918 4915 4910 4908 4906 4905 4904 4900 4899 4892 4891 4889 4888 4887 4886 4884 4883 4881 4876 4875 4873 4872 4871 4868 4867 4864 4863 4861 4859 4857 4856 4850 4848 4846 4844 4839 4838 4836 4834 4833 ...

output:

4961

result:

ok single line: '4961'

Test #30:

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

input:

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

output:

464

result:

ok single line: '464'

Test #31:

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

input:

4983
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1462 1461 1460 1459 1458 1457 1456 1455 1454 1453 1452 1451 1450 1449 1448 1447 1446 1445 1444 1443 1442 1441 1440 1439 1438 1437 143...

output:

119

result:

ok single line: '119'

Test #32:

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

input:

4954
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 4868 4867 4866 4865 4864 4863 4862 4861 4860 4859 4858 4857 4856 4855 4854 4853 4852 4851 4850 4849 4848 4847 4846 4845 4844 4843 4842 4841 4840 4839 4838 4837 4836 4835 4834 4833 4832...

output:

127

result:

ok single line: '127'

Test #33:

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

input:

4979
4419 4470 4753 4439 4742 4063 3095 179 3189 3445 4733 1886 3351 2582 206 3276 4191 966 4066 1356 3897 3578 3661 3899 2377 4234 4313 3860 1571 183 4514 582 7 3741 2866 1192 2363 1269 1355 4271 1337 4729 4915 2797 4630 891 921 3836 2258 2452 2228 3144 1260 4180 4353 2296 1439 2480 1591 3383 2868 ...

output:

1

result:

ok single line: '1'

Test #34:

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

input:

4952
3958 1432 3367 3571 180 108 4713 1020 3455 252 777 1497 4191 3288 1686 1526 4083 2890 866 345 2293 4296 489 660 3821 883 1859 2456 2109 4278 4789 3759 1397 4806 2883 3761 2474 1903 1442 2024 2823 3533 4337 1341 4588 4230 4739 4522 1450 3768 1152 2559 1323 832 422 1480 3719 1407 1909 1621 3005 2...

output:

0

result:

ok single line: '0'

Test #35:

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

input:

4960
3482 2390 3624 2086 3162 4262 3869 849 4200 1681 4431 1342 1164 3428 57 1094 2302 4028 3979 53 763 2784 553 4037 442 3696 4311 938 2193 31 640 3830 1695 4751 2018 3482 2 1476 4369 3810 4692 3414 4638 1921 278 3052 478 2121 4397 2899 1977 3486 4733 556 3693 4580 3857 4905 4605 3360 4664 3945 271...

output:

1

result:

ok single line: '1'

Test #36:

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

input:

1
1

output:

1

result:

ok single line: '1'

Subtask #3:

score: 33
Accepted

Dependency #2:

100%
Accepted

Test #37:

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

input:

49774
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

49774

result:

ok single line: '49774'

Test #38:

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

input:

49708
2 2 2 1 1 1 2 1 1 1 1 1 1 1 2 1 2 2 2 1 1 2 2 1 1 2 1 1 2 2 2 1 1 2 1 1 2 1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 1 1 1 1 2 2 1 2 1 2 2 1 2 1 2 1 1 1 2 2 2 1 1 1 2 2 2 2 2 1 1 1 2 1 1 1 1 1 2 1 1 2 1 1 1 2 1 1 2 2 1 2 1 1 1 2 1 2 2 2 1 2 2 1 2 1 1 2 1 2 2 1 1 2 1 2 2 1 2 1 2 2 2 1 2 2 2 2 1 1 1 2 2 1 ...

output:

49380

result:

ok single line: '49380'

Test #39:

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

input:

49718
2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...

output:

74576

result:

ok single line: '74576'

Test #40:

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

input:

49775
1 8 9 3 2 6 6 9 5 9 1 2 1 3 3 1 1 5 7 1 2 5 5 7 3 3 4 7 5 6 10 1 8 6 10 3 5 5 6 3 4 7 6 5 3 2 5 6 8 8 9 4 3 3 9 4 8 10 1 10 2 7 4 10 9 9 4 4 5 1 5 7 8 6 8 4 1 3 4 5 6 5 8 3 7 3 3 5 7 9 7 6 9 3 9 3 4 5 1 3 8 3 1 6 9 1 7 5 5 4 4 8 6 8 5 7 9 7 4 4 9 7 5 4 6 6 9 4 6 5 2 1 4 3 9 10 4 3 1 7 5 7 1 8 ...

output:

6524

result:

ok single line: '6524'

Test #41:

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

input:

49984
91 55 18 98 86 72 61 70 60 22 15 98 23 1 70 26 91 44 64 78 1 20 58 87 37 99 61 17 40 60 82 1 62 39 27 5 65 96 82 44 2 95 4 79 95 87 45 18 45 8 7 61 18 17 87 74 85 41 93 53 88 94 84 53 27 11 4 16 23 55 22 53 19 64 32 41 25 65 38 40 64 63 23 77 14 18 58 38 36 51 47 69 36 26 9 56 26 63 5 90 93 37...

output:

482

result:

ok single line: '482'

Test #42:

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

input:

49611
56 871 832 207 364 919 980 489 90 612 397 766 355 519 487 297 991 188 809 81 650 739 820 442 243 159 765 880 111 275 205 415 120 297 878 629 524 580 493 600 732 266 15 285 94 254 827 328 834 145 893 166 959 964 562 961 91 189 996 25 478 205 685 700 844 780 617 23 564 578 369 2 691 516 817 640 ...

output:

42

result:

ok single line: '42'

Test #43:

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

input:

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

output:

49947

result:

ok single line: '49947'

Test #44:

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

input:

49538
49538 49537 49536 49535 49534 49533 49532 49531 49530 49529 49528 49527 49526 49525 49524 49523 49522 49521 49520 49519 49518 49517 49516 49515 49514 49513 49512 49511 49510 49509 49508 49507 49506 49505 49504 49503 49502 49501 49500 49499 49498 49497 49496 49495 49494 49493 49492 49491 49490 ...

output:

49538

result:

ok single line: '49538'

Test #45:

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

input:

49937
47136 20016 17834 41791 9204 34419 14310 13198 30790 45849 22370 30928 30944 32745 18828 36274 27059 15304 29549 26071 4012 48586 35515 26089 12223 30266 48544 48633 25495 10937 1862 12523 13288 2368 7048 49794 38107 12618 27028 49912 22803 170 35465 48560 26770 33798 46843 15506 14313 24340 2...

output:

2

result:

ok single line: '2'

Test #46:

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

input:

49505
24752 24751 24750 24749 24748 24747 24746 24745 24744 24743 24742 24741 24740 24739 24738 24737 24736 24735 24734 24733 24732 24731 24730 24729 24728 24727 24726 24725 24724 24723 24722 24721 24720 24719 24718 24717 24716 24715 24714 24713 24712 24711 24710 24709 24708 24707 24706 24705 24704 ...

output:

49505

result:

ok single line: '49505'

Test #47:

score: 0
Accepted
time: 5ms
memory: 12532kb

input:

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

output:

49886

result:

ok single line: '49886'

Test #48:

score: 0
Accepted
time: 5ms
memory: 14520kb

input:

49590
24795 24794 24793 24792 24791 24790 24789 24788 24787 24786 24785 24784 24783 24782 24781 24780 24779 24778 24777 24776 24775 24774 24773 24772 24771 24770 24769 24768 24767 24766 24765 24764 24763 24762 24761 24760 24759 24758 24757 24756 24755 24754 24753 24752 24751 24750 24749 24748 24747 ...

output:

49590

result:

ok single line: '49590'

Test #49:

score: 0
Accepted
time: 5ms
memory: 14476kb

input:

49577
6595 18311 14631 19091 20085 7131 3005 1848 19796 14594 11852 8595 7461 21686 9550 8672 7566 23581 2571 10239 18357 10081 4800 17308 111 23639 961 17245 20550 9135 11190 13456 6700 9783 19668 3090 19716 18990 2043 15869 5210 7503 21718 5074 16984 21856 23876 22369 13198 6514 20593 24518 19363 ...

output:

24791

result:

ok single line: '24791'

Test #50:

score: 0
Accepted
time: 5ms
memory: 14524kb

input:

49889
49889 49888 49887 49886 49885 49884 49883 49882 49881 49880 49879 49878 49877 49876 49875 49874 49873 49872 49871 49870 49869 49868 49867 49866 49865 49864 49863 49862 49861 49860 49859 49858 49857 49856 49855 49854 49853 49852 49851 49850 49849 49848 49847 49846 49845 49844 49843 49842 49841 ...

output:

49889

result:

ok single line: '49889'

Test #51:

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

input:

49757
49757 49756 49755 49754 49753 49752 49751 49750 49749 49748 49747 49746 49745 49744 49743 49742 49741 49740 49739 49738 49737 49736 49735 49734 49733 49732 49731 49730 49729 49728 49727 49726 49725 49724 49723 49722 49721 49720 49719 49718 49717 49716 49715 49714 49713 49712 49711 49710 49709 ...

output:

24881

result:

ok single line: '24881'

Test #52:

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

input:

49925
40619 8933 29524 2716 5542 18051 40870 13751 46263 26461 1247 15274 41054 15202 35943 5580 10591 12477 43557 45813 1624 13189 25064 35836 27504 43222 49149 40294 21089 10513 41615 8351 35244 2333 38675 1970 5823 9998 18157 49853 41110 18613 12940 37969 4365 23639 48078 25449 13664 47182 11385 ...

output:

0

result:

ok single line: '0'

Test #53:

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

input:

49611
49610 49608 49607 49606 49605 49603 49600 49598 49597 49592 49591 49590 49589 49585 49584 49583 49580 49578 49574 49571 49570 49567 49566 49563 49561 49560 49558 49557 49555 49551 49550 49548 49547 49545 49540 49539 49538 49536 49534 49532 49529 49528 49527 49523 49520 49515 49514 49512 49511 ...

output:

49611

result:

ok single line: '49611'

Test #54:

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

input:

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

output:

4637

result:

ok single line: '4637'

Test #55:

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

input:

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

output:

1178

result:

ok single line: '1178'

Test #56:

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

input:

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

output:

1259

result:

ok single line: '1259'

Test #57:

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

input:

49794
44189 44702 47525 44394 47419 40625 30947 1788 31887 34446 47328 18857 33505 25819 2051 32763 41906 9653 40660 13560 38965 35783 36613 38990 23772 42342 43133 38603 15712 1826 45141 5811 69 37410 28657 11912 23629 12688 13547 42705 13365 47294 49153 27969 46295 8903 9209 38355 22579 24518 2227...

output:

0

result:

ok single line: '0'

Test #58:

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

input:

49524
39584 14319 33669 35706 1791 1071 47128 10199 34552 2515 7767 14970 41908 32880 16856 15260 40826 28903 8651 3446 22925 42958 4882 6599 38209 8822 18586 24561 21085 42775 47891 37587 13968 48063 28832 37605 24737 19030 14415 20242 28224 35329 43372 13405 45883 42300 47393 45225 14499 37677 115...

output:

0

result:

ok single line: '0'

Test #59:

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

input:

49604
34821 23894 36237 20861 31622 42619 38693 8491 42001 16810 44312 13420 11639 34279 566 10933 23019 40277 39793 523 7622 27838 5522 40365 4414 36960 43114 9381 21929 305 6396 38297 16946 47513 20179 34819 14 14762 43692 38096 46915 34139 46383 19206 2772 30517 4780 21209 43970 28984 19765 34854...

output:

1

result:

ok single line: '1'

Test #60:

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

input:

1
1

output:

1

result:

ok single line: '1'

Subtask #4:

score: 0
Skipped

Dependency #1:

0%