QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#500791 | #6670. Niz | ChiFAN | 100 ✓ | 906ms | 64032kb | C++14 | 2.1kb | 2024-08-01 20:36:31 | 2024-08-01 20:36:33 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e6+114;
struct info{
int val;
int cnt;
info(int V=0,int C=1){
val=V;
cnt=C;
}
info operator+(info b){
if(val==b.val){
return info(val,cnt+b.cnt);
}else if(val>b.val) return info(val,cnt);
else return b;
}
}tr[maxn<<2];
int a[maxn],lst[maxn],n;
int tot[maxn];
int tag[maxn<<2];
void pushup(int cur){
tr[cur]=tr[cur<<1]+tr[cur<<1|1];
}
void pushdown(int cur){
tr[cur<<1].val+=tag[cur];
tag[cur<<1]+=tag[cur];
tr[cur<<1|1].val+=tag[cur];
tag[cur<<1|1]+=tag[cur];
tag[cur]=0;
}
void add(int cur,int lt,int rt,int l,int r,int c){
if(rt<l||r<lt) return ;
if(l<=lt&&rt<=r){
tr[cur].val+=c;
tag[cur]+=c;
return ;
}
pushdown(cur);
int mid=(lt+rt)>>1;
add(cur<<1,lt,mid,l,r,c);
add(cur<<1|1,mid+1,rt,l,r,c);
pushup(cur);
}
int lst1;
info ask(int cur,int lt,int rt,int l,int r){
if(l<=lt&&rt<=r) return tr[cur];
pushdown(cur);
int mid=(lt+rt)>>1;
if(l<=mid&&r>mid) return ask(cur<<1,lt,mid,l,r)+ask(cur<<1|1,mid+1,rt,l,r);
else if(l<=mid) return ask(cur<<1,lt,mid,l,r);
else return ask(cur<<1|1,mid+1,rt,l,r);
}
long long ans;
int stk[maxn],tp;
int colL=1;
int t[maxn];
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
lst[i]=tot[a[i]];
tot[a[i]]=i;
}
for(int i=1;i<=n;i++){
if(a[i]==1) lst1=i;
while(a[stk[tp]]<a[i]&&tp>0){
//区间 [stk[tp-1]+1,stk[tp]] 最大值由 a[skt[tp]] 变为 a[i]
add(1,1,n,stk[tp-1]+1,stk[tp],a[stk[tp]]);
tp--;
}
add(1,1,n,stk[tp]+1,i,-a[i]);
stk[++tp]=i;
add(1,1,n,1,i,1);
while(t[a[i]]!=0){
t[a[colL]]--;
colL++;
}
t[a[i]]++;
if(colL<=lst1){
info res=ask(1,1,n,colL,lst1);
if(res.val==0) ans+=res.cnt;
}
}
cout<<ans<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 13
Accepted
Test #1:
score: 13
Accepted
time: 752ms
memory: 60324kb
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: 13
Accepted
time: 444ms
memory: 64032kb
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
Accepted
time: 861ms
memory: 60400kb
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:
2
result:
ok single line: '2'
Test #4:
score: 13
Accepted
time: 638ms
memory: 60724kb
input:
991802 495901 495900 495899 495898 495897 495896 495895 495894 495893 495892 495891 495890 495889 495888 495887 495886 495885 495884 495883 495882 495881 495880 495879 495878 495877 495876 495875 495874 495873 495872 495871 495870 495869 495868 495867 495866 495865 495864 495863 495862 495861 495860...
output:
991802
result:
ok single line: '991802'
Test #5:
score: 13
Accepted
time: 730ms
memory: 60080kb
input:
991541 155561 90787 79050 102012 302337 425258 434631 156967 95806 390981 11852 438211 136965 331050 223485 319359 65254 129022 228172 335927 252877 88447 242710 215447 157160 257148 421902 439303 93618 343574 318048 490244 125166 201632 177193 397493 237454 166715 38324 237791 225567 7503 428805 20...
output:
495773
result:
ok single line: '495773'
Test #6:
score: 13
Accepted
time: 597ms
memory: 61292kb
input:
997777 997777 997776 997775 997774 997773 997772 997771 997770 997769 997768 997767 997766 997765 997764 997763 997762 997761 997760 997759 997758 997757 997756 997755 997754 997753 997752 997751 997750 997749 997748 997747 997746 997745 997744 997743 997742 997741 997740 997739 997738 997737 997736...
output:
997777
result:
ok single line: '997777'
Test #7:
score: 13
Accepted
time: 630ms
memory: 61184kb
input:
995139 995139 995138 995137 995136 995135 995134 995133 995132 995131 995130 995129 995128 995127 995126 995125 995124 995123 995122 995121 995120 995119 995118 995117 995116 995115 995114 995113 995112 995111 995110 995109 995108 995107 995106 995105 995104 995103 995102 995101 995100 995099 995098...
output:
497572
result:
ok single line: '497572'
Test #8:
score: 13
Accepted
time: 851ms
memory: 63840kb
input:
992233 992233 992232 992230 992228 992227 992226 992223 992221 992219 992216 992215 992214 992213 992212 992210 992209 992208 992207 992206 992203 992201 992200 992197 992196 992190 992189 992188 992186 992185 992182 992180 992179 992177 992175 992174 992172 992171 992170 992169 992167 992166 992163...
output:
992233
result:
ok single line: '992233'
Test #9:
score: 13
Accepted
time: 817ms
memory: 61108kb
input:
992946 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:
92622
result:
ok single line: '92622'
Test #10:
score: 13
Accepted
time: 777ms
memory: 61004kb
input:
996504 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:
23522
result:
ok single line: '23522'
Test #11:
score: 13
Accepted
time: 817ms
memory: 62712kb
input:
990975 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:
25159
result:
ok single line: '25159'
Test #12:
score: 13
Accepted
time: 2ms
memory: 40048kb
input:
1 1
output:
1
result:
ok single line: '1'
Subtask #2:
score: 20
Accepted
Test #13:
score: 20
Accepted
time: 6ms
memory: 39356kb
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: 20
Accepted
time: 5ms
memory: 40116kb
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: 20
Accepted
time: 6ms
memory: 39136kb
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: 20
Accepted
time: 3ms
memory: 40584kb
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: 20
Accepted
time: 7ms
memory: 40108kb
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: 20
Accepted
time: 7ms
memory: 40524kb
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: 20
Accepted
time: 0ms
memory: 39548kb
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: 20
Accepted
time: 0ms
memory: 39888kb
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: 20
Accepted
time: 3ms
memory: 41076kb
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: 20
Accepted
time: 8ms
memory: 40276kb
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: 20
Accepted
time: 0ms
memory: 39104kb
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: 20
Accepted
time: 0ms
memory: 40884kb
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: 20
Accepted
time: 3ms
memory: 40908kb
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: 20
Accepted
time: 0ms
memory: 40252kb
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: 20
Accepted
time: 7ms
memory: 39984kb
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: 20
Accepted
time: 0ms
memory: 40332kb
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: 20
Accepted
time: 4ms
memory: 39680kb
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: 20
Accepted
time: 8ms
memory: 39296kb
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: 20
Accepted
time: 4ms
memory: 40216kb
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: 20
Accepted
time: 8ms
memory: 39720kb
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: 20
Accepted
time: 9ms
memory: 39156kb
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: 20
Accepted
time: 4ms
memory: 39272kb
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: 20
Accepted
time: 8ms
memory: 40900kb
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: 20
Accepted
time: 3ms
memory: 40472kb
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: 23ms
memory: 41024kb
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: 33
Accepted
time: 20ms
memory: 41796kb
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: 33
Accepted
time: 26ms
memory: 40988kb
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: 33
Accepted
time: 32ms
memory: 39580kb
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: 33
Accepted
time: 24ms
memory: 41784kb
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: 33
Accepted
time: 29ms
memory: 41760kb
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: 33
Accepted
time: 29ms
memory: 43432kb
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: 33
Accepted
time: 23ms
memory: 40112kb
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: 33
Accepted
time: 34ms
memory: 42036kb
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: 33
Accepted
time: 26ms
memory: 41092kb
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: 33
Accepted
time: 24ms
memory: 43388kb
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: 33
Accepted
time: 27ms
memory: 43692kb
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: 33
Accepted
time: 30ms
memory: 40872kb
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: 33
Accepted
time: 16ms
memory: 40916kb
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: 33
Accepted
time: 33ms
memory: 41232kb
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: 33
Accepted
time: 28ms
memory: 41260kb
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: 33
Accepted
time: 36ms
memory: 43760kb
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: 33
Accepted
time: 28ms
memory: 41268kb
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: 33
Accepted
time: 27ms
memory: 42212kb
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: 33
Accepted
time: 37ms
memory: 42140kb
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: 33
Accepted
time: 32ms
memory: 43712kb
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: 33
Accepted
time: 28ms
memory: 41976kb
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: 33
Accepted
time: 22ms
memory: 42096kb
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: 33
Accepted
time: 5ms
memory: 40344kb
input:
1 1
output:
1
result:
ok single line: '1'
Subtask #4:
score: 34
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #61:
score: 34
Accepted
time: 514ms
memory: 57964kb
input:
995488 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
995488
result:
ok single line: '995488'
Test #62:
score: 34
Accepted
time: 621ms
memory: 54444kb
input:
994170 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:
993530
result:
ok single line: '993530'
Test #63:
score: 34
Accepted
time: 609ms
memory: 57872kb
input:
994360 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:
1491539
result:
ok single line: '1491539'
Test #64:
score: 34
Accepted
time: 684ms
memory: 54092kb
input:
995508 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:
131772
result:
ok single line: '131772'
Test #65:
score: 34
Accepted
time: 688ms
memory: 52036kb
input:
999671 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 3...
output:
10312
result:
ok single line: '10312'
Test #66:
score: 34
Accepted
time: 661ms
memory: 53996kb
input:
992220 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:
971
result:
ok single line: '971'
Test #67:
score: 34
Accepted
time: 740ms
memory: 59660kb
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 #68:
score: 34
Accepted
time: 453ms
memory: 62860kb
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 #69:
score: 34
Accepted
time: 906ms
memory: 58956kb
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:
2
result:
ok single line: '2'
Test #70:
score: 34
Accepted
time: 856ms
memory: 57792kb
input:
990103 495051 495050 495049 495048 495047 495046 495045 495044 495043 495042 495041 495040 495039 495038 495037 495036 495035 495034 495033 495032 495031 495030 495029 495028 495027 495026 495025 495024 495023 495022 495021 495020 495019 495018 495017 495016 495015 495014 495013 495012 495011 495010...
output:
990103
result:
ok single line: '990103'
Test #71:
score: 34
Accepted
time: 573ms
memory: 58272kb
input:
997713 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:
997714
result:
ok single line: '997714'
Test #72:
score: 34
Accepted
time: 642ms
memory: 63196kb
input:
991802 495901 495900 495899 495898 495897 495896 495895 495894 495893 495892 495891 495890 495889 495888 495887 495886 495885 495884 495883 495882 495881 495880 495879 495878 495877 495876 495875 495874 495873 495872 495871 495870 495869 495868 495867 495866 495865 495864 495863 495862 495861 495860...
output:
991802
result:
ok single line: '991802'
Test #73:
score: 34
Accepted
time: 756ms
memory: 58888kb
input:
991541 155561 90787 79050 102012 302337 425258 434631 156967 95806 390981 11852 438211 136965 331050 223485 319359 65254 129022 228172 335927 252877 88447 242710 215447 157160 257148 421902 439303 93618 343574 318048 490244 125166 201632 177193 397493 237454 166715 38324 237791 225567 7503 428805 20...
output:
495773
result:
ok single line: '495773'
Test #74:
score: 34
Accepted
time: 587ms
memory: 63656kb
input:
997777 997777 997776 997775 997774 997773 997772 997771 997770 997769 997768 997767 997766 997765 997764 997763 997762 997761 997760 997759 997758 997757 997756 997755 997754 997753 997752 997751 997750 997749 997748 997747 997746 997745 997744 997743 997742 997741 997740 997739 997738 997737 997736...
output:
997777
result:
ok single line: '997777'
Test #75:
score: 34
Accepted
time: 644ms
memory: 62300kb
input:
995139 995139 995138 995137 995136 995135 995134 995133 995132 995131 995130 995129 995128 995127 995126 995125 995124 995123 995122 995121 995120 995119 995118 995117 995116 995115 995114 995113 995112 995111 995110 995109 995108 995107 995106 995105 995104 995103 995102 995101 995100 995099 995098...
output:
497572
result:
ok single line: '497572'
Test #76:
score: 34
Accepted
time: 829ms
memory: 59744kb
input:
998489 812441 178646 590527 54288 110832 361033 817465 275016 925345 529258 24920 305491 821146 304049 718917 111586 211813 249550 871207 916344 32451 263778 501315 716768 550112 864502 983065 805949 421800 210257 832376 167010 704928 46642 773561 39369 116437 199951 363156 997144 822277 372266 2587...
output:
0
result:
ok single line: '0'
Test #77:
score: 34
Accepted
time: 843ms
memory: 60980kb
input:
992233 992233 992232 992230 992228 992227 992226 992223 992221 992219 992216 992215 992214 992213 992212 992210 992209 992208 992207 992206 992203 992201 992200 992197 992196 992190 992189 992188 992186 992185 992182 992180 992179 992177 992175 992174 992172 992171 992170 992169 992167 992166 992163...
output:
992233
result:
ok single line: '992233'
Test #78:
score: 34
Accepted
time: 814ms
memory: 61476kb
input:
992946 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:
92622
result:
ok single line: '92622'
Test #79:
score: 34
Accepted
time: 784ms
memory: 61336kb
input:
996504 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:
23522
result:
ok single line: '23522'
Test #80:
score: 34
Accepted
time: 814ms
memory: 61672kb
input:
990975 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:
25159
result:
ok single line: '25159'
Test #81:
score: 34
Accepted
time: 793ms
memory: 60252kb
input:
995881 883907 894168 950643 888010 948517 812615 619034 35748 637827 689026 946698 377186 670208 516463 41011 655353 838250 193085 813329 271241 779421 715768 732363 779911 475502 846969 862781 772183 314278 36520 902954 116233 1366 748314 573217 238274 472650 253800 270977 854238 267339 946028 9832...
output:
0
result:
ok single line: '0'
Test #82:
score: 34
Accepted
time: 802ms
memory: 59528kb
input:
990487 791709 286374 673409 714144 35806 21412 942594 203975 691071 50293 155331 299412 838181 657628 337118 305199 816552 578069 173028 68913 458514 859197 97632 131980 764209 176440 371734 491237 421701 855527 957862 751762 279373 961302 576651 752118 494751 380614 288310 404851 564501 706610 8674...
output:
2
result:
ok single line: '2'
Test #83:
score: 34
Accepted
time: 801ms
memory: 58672kb
input:
992084 696445 477895 724764 417232 632468 852428 773902 169816 840053 336200 886288 268407 232794 685609 11307 218672 460406 805568 795905 10445 152442 556792 110434 807330 88271 739243 862312 187625 438599 6093 127912 765975 338925 950303 403596 696420 264 295239 873881 761956 938335 682808 927702 ...
output:
0
result:
ok single line: '0'
Test #84:
score: 34
Accepted
time: 0ms
memory: 40188kb
input:
1 1
output:
1
result:
ok single line: '1'
Extra Test:
score: 0
Extra Test Passed