QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#455776 | #5245. Chodzenie po linie [B] | miaomiaomiaowu | 1 | 1417ms | 508592kb | C++14 | 2.9kb | 2024-06-26 19:38:33 | 2024-06-26 19:38:33 |
Judging History
answer
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define pii pair<int,int>
#define MP make_pair
template <class Miaowu>
inline void in(Miaowu &x){
char c;x=0;bool f=0;
for(c=getchar();c<'0'||c>'9';c=getchar());
for(;c>='0'&&c<='9';c=getchar())x=(x<<1)+(x<<3)+(c^48);
x=f?-x:x;
}
const int N=5e5+5;
ll ans[N],sum[N<<6];
vector<pii>vc[N];
int n,tot,aa[N],a[N],head[N<<6],de[N<<6],bel[N],ds1[N],ds2[N],tag1[N],tag2[N],bg[N],ed[N],sufmn[N];
struct Edge{int to,nxt;}e[N<<6];
inline void addedge(int u,int v){
e[++tot]=Edge{v,head[u]},head[u]=tot;
}
inline void dfs(int u){
for(int i=head[u];i;i=e[i].nxt){
int v=e[i].to;
de[v]=de[u]+1,sum[v]+=sum[u],dfs(v);
}
}
inline int qry1(int y){
if(y==1)return 0;
return tag1[bel[y-1]]+ds1[y-1];
}
inline int qry2(int y){
if(y==n)return 0;
return tag2[bel[y+1]]+ds2[y+1];
}
inline void add1(int y,int v){
for(int i=bel[y]+1;i<=bel[n];i++)tag1[i]+=v;
for(int i=y;i<=ed[bel[y]];i++)ds1[i]+=v;
}
inline void add2(int y,int v){
for(int i=1;i<bel[y];i++)tag2[i]+=v;
for(int i=bg[bel[y]];i<=y;i++)ds2[i]+=v;
}
inline void work(int l,int op){
for(int i=0;i<=n+1;i++){
sufmn[i]=2e9;
tag1[i]=tag2[i]=ds1[i]=ds2[i]=bg[i]=ed[i]=0;
}
int B=(int)sqrt(1.0*n);
for(int i=1;i<=n;i++)bel[i]=(i-1)/B+1,ed[bel[i]]=i;
for(int i=n;i>=1;i--)bg[bel[i]]=i;
int ind=tot=0,rt;
for(int i=1;i<=n;i++){
ind++,head[ind]=0;
vc[i].clear();
vc[i].push_back(MP(a[i],ind));
add1(a[i],1);
sufmn[a[i]]=min(sufmn[a[i]],i);
}
for(int i=n;i>=1;i--)
sufmn[i]=min(sufmn[i],sufmn[i+1]);
int mny=2e9;
for(int i=n;i>=1;i--){
if(op==0)ans[i+l-1]-=qry2(a[i])+1,ans[i+l-1]-=(n-1-qry1(a[i])-qry2(a[i]));
else ans[n-i+l]-=qry2(a[i])+1;
mny=min(mny,a[i]);
add2(a[i],1);
for(int ii=0;ii<vc[i].size();ii++){
pii x=vc[i][ii];
sum[x.second]=qry1(x.first);
if(i==1&&x.first==1)continue;
int qx=sufmn[x.first],qy=mny;
if(vc[qx].back().first!=qy){
ind++,head[ind]=0;
addedge(ind,x.second);
if(qx==1&&qy==1)rt=ind;
vc[qx].push_back(MP(qy,ind));
}
else{
addedge(vc[qx].back().second,x.second);
}
}
add1(a[i],-1);
}
dfs(rt);
}
inline void solve(int l,int r){
int _n=n;n=r-l+1;
for(int i=1;i<=n;i++)
a[i]=aa[i+l-1]-l+1;
work(l,0);
for(int i=1;i<=n;i++)
ans[i+l-1]+=n+sum[i];
reverse(a+1,a+n+1);
for(int i=1;i<=n;i++)
a[i]=n-a[i]+1;
work(l,1);
for(int i=1;i<=n;i++)
ans[n-i+l]+=n+sum[i];
for(int i=1;i<=n;i++)
a[i]=n-a[i]+1;
reverse(a+1,a+n+1);
n=_n;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++)
in(aa[i]);
for(int i=1;i<=n;i++){
int j=i,mx=0,mn=2e9;
while(j<=n){
mx=max(mx,aa[j]);
mn=min(mn,aa[j]);
if(mn==i&&mx==j){
break;
}
j++;
}
solve(i,j),i=j;
}
for(int i=1;i<=n;i++)
printf("%lld ",ans[i]);
return 0;
}
詳細信息
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
1 1
output:
result:
Subtask #2:
score: 1
Accepted
Test #15:
score: 1
Accepted
time: 0ms
memory: 38700kb
input:
500 205 204 190 155 2 17 29 431 494 438 336 6 310 458 239 327 131 5 93 44 359 398 249 63 314 281 395 177 411 122 55 436 166 447 25 480 242 261 456 43 422 364 46 424 383 279 91 464 448 435 58 220 332 237 485 418 26 370 86 255 56 159 77 206 257 348 468 320 292 212 103 484 68 256 451 167 22 473 64 299 ...
output:
794 794 807 841 1130 1019 980 575 513 568 667 985 693 552 762 677 860 980 898 946 652 614 754 925 693 723 620 815 608 864 926 588 825 581 948 552 759 743 575 929 601 652 927 602 634 723 884 578 589 595 911 772 679 755 566 608 927 648 881 743 905 819 888 784 746 672 591 692 715 774 862 582 887 744 60...
result:
ok 500 numbers
Test #16:
score: 0
Accepted
time: 0ms
memory: 40796kb
input:
500 31 78 48 99 102 98 66 39 26 94 88 27 84 42 90 22 95 28 61 23 32 86 103 70 68 14 50 89 2 100 82 93 101 3 11 5 64 29 49 60 81 47 36 13 18 45 19 58 24 21 54 43 69 17 80 87 8 56 57 1 96 44 15 10 59 73 35 72 9 65 51 97 41 25 34 6 7 55 4 79 63 75 67 33 16 77 12 53 83 46 76 74 37 91 38 85 62 20 92 40 3...
output:
176 128 157 109 107 108 137 161 171 114 119 169 123 158 121 168 120 166 142 165 165 126 124 136 137 166 151 129 175 130 129 129 132 171 164 169 139 159 150 142 134 147 153 157 155 151 154 148 153 151 153 153 152 147 147 149 147 152 152 145 157 150 144 142 156 157 150 158 138 157 154 167 146 143 147 ...
result:
ok 500 numbers
Test #17:
score: 0
Accepted
time: 0ms
memory: 38652kb
input:
500 8 10 1 11 16 14 15 18 9 5 2 13 4 12 7 17 3 19 6 23 22 21 20 33 31 25 28 29 26 27 30 32 34 24 48 47 36 39 59 35 45 61 52 40 37 56 42 44 55 57 58 43 50 54 46 38 51 49 60 41 53 63 66 68 67 62 65 64 70 69 71 78 81 77 79 84 80 88 76 83 86 82 87 74 85 72 75 73 107 99 92 97 98 94 102 105 100 104 91 93 ...
output:
29 28 43 30 26 27 27 27 24 26 28 28 26 29 24 34 23 40 23 3 3 3 3 11 12 17 15 15 15 15 17 18 19 10 40 40 61 51 32 49 42 35 40 44 44 39 43 42 41 42 42 39 42 41 39 34 44 43 52 33 48 13 9 8 8 8 9 9 1 1 0 26 24 25 26 24 25 22 21 25 25 24 26 18 26 18 18 17 24 31 37 33 33 34 33 31 33 32 30 31 35 34 27 35 3...
result:
ok 500 numbers
Test #18:
score: 0
Accepted
time: 0ms
memory: 40596kb
input:
337 8 6 7 11 3 14 1 10 17 5 18 21 22 20 12 16 2 27 25 29 19 30 23 26 13 32 24 35 15 31 34 4 36 37 43 44 46 42 40 47 9 45 38 41 50 33 52 48 53 56 49 55 58 28 39 61 60 65 57 66 68 70 54 67 64 71 76 73 78 59 51 62 72 82 83 74 75 87 79 81 63 84 69 86 93 91 90 88 94 98 95 100 92 77 89 85 99 107 108 109 1...
output:
809 810 810 787 898 786 903 788 787 797 788 786 786 785 785 785 886 788 789 619 703 620 706 706 696 622 705 621 694 623 623 691 633 633 627 627 626 625 626 628 677 650 648 648 668 636 523 597 524 522 594 523 523 546 579 619 619 549 541 550 549 546 533 548 546 549 545 547 506 553 496 613 592 577 577 ...
result:
ok 337 numbers
Test #19:
score: 0
Accepted
time: 0ms
memory: 36652kb
input:
466 11 5 18 13 14 3 15 25 23 24 10 12 8 30 28 21 17 6 32 19 7 36 26 43 2 33 16 1 45 40 46 47 29 41 27 42 9 44 49 50 54 39 22 56 59 55 53 4 51 20 37 71 72 31 48 35 34 58 64 77 63 74 65 70 82 83 86 79 87 84 73 90 38 69 66 68 92 85 81 76 62 67 75 91 57 52 89 80 88 78 60 61 98 95 101 99 111 102 117 110 ...
output:
255 260 250 254 254 292 255 246 247 247 249 250 249 247 248 248 250 246 227 246 239 223 245 184 227 216 220 225 190 190 191 191 223 189 221 190 207 194 196 196 178 182 199 179 177 178 177 177 206 198 218 211 211 197 209 200 200 212 228 225 227 228 227 223 225 225 223 225 224 224 224 224 172 235 237 ...
result:
ok 466 numbers
Test #20:
score: 0
Accepted
time: 0ms
memory: 38708kb
input:
380 22 31 26 3 10 23 16 15 5 8 39 4 27 41 24 43 9 37 36 11 13 1 32 35 28 38 12 29 34 33 59 47 44 62 60 17 18 61 20 49 69 7 54 57 64 56 74 51 67 52 2 73 63 40 58 30 14 81 82 77 87 6 80 83 78 19 79 70 25 85 53 84 76 55 94 96 88 48 102 107 103 42 46 111 92 21 86 65 90 95 105 108 75 117 99 66 68 91 101 ...
output:
1873 1865 1869 2033 2017 1873 2011 2011 2028 2016 1866 2026 1876 1867 1875 1867 2011 1869 1869 2010 2009 2210 1875 1873 1875 1876 2006 1875 1875 1875 1450 1461 1706 1450 1451 1758 1758 1453 1753 1461 1450 1743 1457 1455 1457 1454 1451 1455 1456 1454 1734 1458 1461 1692 1458 1679 1734 1459 1459 1461 ...
result:
ok 380 numbers
Test #21:
score: 0
Accepted
time: 0ms
memory: 38772kb
input:
500 8 6 12 22 26 5 7 33 24 46 19 13 44 41 11 29 40 10 17 47 51 32 62 23 58 63 39 52 18 35 14 20 34 2 70 28 68 54 65 75 25 53 31 73 3 80 4 84 36 72 56 55 9 93 77 61 57 88 71 45 27 98 97 60 49 92 66 95 1 37 59 43 111 69 107 82 99 21 87 100 64 119 81 122 104 114 110 85 112 96 106 38 50 78 91 118 128 13...
output:
2483 2484 2481 2340 2337 2443 2444 1632 2013 1621 2013 2067 1624 1626 2064 2010 1628 2062 2013 1630 1627 1633 1618 2007 1622 1620 1627 1627 2003 1630 2050 2004 1632 2043 1622 2003 1624 1631 1627 1622 1999 1630 1627 1626 2029 1623 2025 1621 1630 1627 1630 1630 2021 1618 1629 1628 1629 1625 1629 1622 ...
result:
ok 500 numbers
Test #22:
score: 0
Accepted
time: 0ms
memory: 38676kb
input:
458 40 41 38 48 52 12 51 22 13 35 55 23 5 36 16 46 47 19 61 67 27 49 44 65 33 59 2 75 71 76 28 78 11 15 1 45 4 34 3 32 37 88 72 53 77 93 17 14 87 94 31 20 86 100 7 99 26 21 43 89 82 101 63 108 74 9 24 62 42 68 95 107 120 64 114 117 103 39 69 84 91 125 73 106 29 116 85 130 110 115 122 66 57 102 134 8...
output:
1163 1163 1163 1158 1093 1174 1094 1164 1172 1153 1096 1163 1519 1154 1167 1152 1152 1163 1098 1093 1158 1153 1151 1097 1150 1101 1500 1093 1096 1094 1151 1094 1152 1153 1486 1151 1485 1150 1484 1150 1154 1099 1105 1109 1106 1098 1148 1146 1103 1101 1144 1146 1104 1099 1140 1100 1143 1143 1152 1108 ...
result:
ok 458 numbers
Test #23:
score: 0
Accepted
time: 0ms
memory: 38620kb
input:
500 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 430 429 428 427 ...
output:
499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 499 ...
result:
ok 500 numbers
Test #24:
score: 0
Accepted
time: 4ms
memory: 40684kb
input:
500 2 4 1 6 3 7 8 10 5 13 9 11 18 12 15 14 16 19 20 21 23 17 24 25 28 22 26 29 38 27 30 34 33 36 35 32 39 40 37 41 43 31 45 42 46 48 44 54 47 49 50 57 56 55 52 51 60 53 59 62 58 64 61 65 68 63 66 70 67 73 69 78 72 71 80 76 77 75 74 82 79 84 81 86 83 87 88 90 85 95 89 100 94 97 92 98 99 96 91 102 93 ...
output:
63159 62165 62661 61179 61671 61187 61187 60205 60689 59243 59723 59741 58293 58767 58790 58790 58791 58325 58325 58325 57369 57827 57411 57411 56463 56913 56961 56515 55575 56017 56073 55608 55608 55608 55608 55606 55640 55640 55608 55641 54725 55143 53895 54309 53981 53075 53483 52265 52669 52763 ...
result:
ok 500 numbers
Subtask #3:
score: 0
Runtime Error
Test #25:
score: 1
Accepted
time: 2ms
memory: 38832kb
input:
3000 2916 252 1255 86 554 396 1643 1080 2300 2570 2014 2676 1984 2282 748 2548 1920 1821 2699 437 1186 486 656 2510 2425 2701 2409 259 503 477 302 1155 2468 1512 2817 2303 819 2721 365 2744 249 2013 1542 876 1153 1757 2865 1461 192 1714 814 62 198 953 918 153 147 1245 194 334 2125 1024 697 1993 1846...
output:
3083 5747 4744 5911 5446 5603 4360 4920 3705 3436 3989 3332 4017 3722 5246 3460 4079 4177 3316 5550 4807 5501 5334 3502 3586 3321 3600 5718 5481 5504 5674 4839 3549 4486 3214 3709 5169 3311 5605 3290 5713 3993 4455 5111 4836 4245 3178 4533 5762 4288 5166 5887 5756 5033 5067 5796 5801 4753 5758 5629 ...
result:
ok 3000 numbers
Test #26:
score: 0
Accepted
time: 3ms
memory: 38644kb
input:
3000 213 481 366 714 165 401 359 541 625 817 503 58 421 683 399 595 829 870 845 393 191 347 83 473 87 240 656 674 536 686 93 475 719 629 700 189 698 19 704 474 286 620 409 266 502 138 726 528 663 440 830 882 34 292 883 865 288 736 858 117 557 531 238 522 153 601 365 175 137 589 780 558 203 20 886 67...
output:
1615 1348 1462 1116 1658 1427 1466 1291 1208 1019 1326 1760 1406 1153 1424 1239 1014 974 998 1425 1620 1467 1725 1355 1721 1574 1185 1168 1297 1160 1711 1353 1132 1211 1149 1613 1151 1772 1149 1350 1521 1218 1410 1538 1329 1654 1139 1306 1186 1380 1043 996 1744 1510 998 1011 1511 1132 1019 1663 1280...
result:
ok 3000 numbers
Test #27:
score: 0
Accepted
time: 3ms
memory: 40736kb
input:
3000 15 5 7 29 24 2 26 11 12 22 31 20 27 14 10 9 25 6 18 19 28 8 16 13 21 4 23 30 17 1 3 56 77 73 54 98 104 62 85 80 55 34 103 53 96 102 59 95 79 41 105 89 63 76 44 45 35 64 68 75 93 84 48 72 42 51 70 83 46 71 94 32 47 82 92 49 40 38 88 97 60 66 86 39 99 57 52 43 100 50 87 37 81 90 69 58 101 74 65 7...
output:
46 55 54 35 39 54 39 49 49 42 40 42 42 44 43 43 44 42 45 45 49 40 45 43 48 34 50 56 44 31 32 125 105 108 124 86 81 116 98 102 118 137 86 117 91 88 116 91 102 123 94 97 112 102 117 117 123 114 111 107 102 106 111 106 111 109 109 111 109 109 111 109 108 114 113 107 101 102 117 121 109 110 119 97 126 1...
result:
ok 3000 numbers
Test #28:
score: 0
Accepted
time: 7ms
memory: 36580kb
input:
1423 5 7 9 3 1 6 4 10 8 12 17 13 11 20 19 21 18 14 24 26 16 27 28 2 25 32 15 29 30 22 23 33 35 39 37 34 38 42 31 41 43 48 44 50 51 45 47 46 40 56 49 52 36 59 61 54 57 53 65 64 66 63 58 60 71 68 69 67 62 73 74 76 72 55 77 78 79 70 81 83 80 87 89 90 84 75 88 82 93 95 86 85 97 92 98 99 103 102 100 104 ...
output:
1271 1270 1269 1270 1391 1271 1270 1274 1272 1274 1068 1173 1172 1068 1068 1069 1067 1170 1065 1064 1063 1065 1065 1148 1077 893 970 1002 1002 982 982 953 952 772 773 862 774 773 826 808 843 839 842 839 839 840 839 839 800 690 765 767 717 792 791 809 793 808 793 793 794 792 790 791 786 791 791 790 7...
result:
ok 1423 numbers
Test #29:
score: 0
Accepted
time: 3ms
memory: 40912kb
input:
2998 19 4 18 2 10 3 1 8 23 24 29 5 12 14 11 28 22 9 39 21 30 40 36 13 43 41 32 16 27 49 17 6 20 53 42 7 52 57 51 59 61 60 45 15 62 33 54 31 50 69 64 68 71 35 70 44 48 78 66 38 58 56 37 80 75 76 25 73 47 90 72 89 55 79 84 77 74 65 26 85 67 91 92 83 105 94 99 86 87 97 108 46 81 114 112 102 103 95 100 ...
output:
138858 141851 138859 141851 138878 141850 141849 138881 138866 138866 138798 141774 138852 138851 138851 138802 138845 138848 132970 135922 135897 132972 132973 135923 132972 132973 135893 135913 135891 132971 135907 135908 135914 132972 132977 135901 132981 132980 132980 132980 132979 132979 132979...
result:
ok 2998 numbers
Test #30:
score: 0
Accepted
time: 0ms
memory: 38984kb
input:
2999 3 19 7 20 12 40 34 2 42 9 5 36 47 45 26 25 31 24 21 23 37 18 48 49 15 38 55 52 16 39 4 54 53 56 69 32 46 43 70 41 67 76 50 33 66 58 28 51 14 22 83 65 44 84 10 90 91 29 93 73 71 88 63 95 6 80 59 94 27 77 8 92 17 1 105 99 109 30 89 101 104 35 113 97 64 86 100 122 111 75 114 118 121 123 108 13 120...
output:
66823 66725 66793 66726 66731 66708 66713 66789 66709 66786 66787 66714 66708 66709 66719 66719 66716 66718 66720 66719 66718 66716 66717 66717 66716 66718 66714 66716 66713 66717 66768 66718 66718 66720 60962 63848 63851 63851 60965 63849 60966 60962 63853 63841 60967 63841 63839 63853 63831 63836 ...
result:
ok 2999 numbers
Test #31:
score: 0
Accepted
time: 0ms
memory: 38972kb
input:
2876 40 32 26 52 36 24 49 50 37 4 59 21 51 30 19 55 41 1 31 18 64 34 35 44 47 45 65 70 75 48 60 23 11 29 73 8 43 22 7 83 56 71 46 91 63 80 92 12 27 96 79 68 99 13 53 62 74 85 105 58 17 107 57 10 88 108 42 14 104 6 116 120 89 33 115 95 77 114 121 125 110 5 86 93 69 2 94 128 124 133 137 101 102 103 11...
output:
45195 45213 45218 45186 45210 45217 45190 45190 45209 47969 45186 45216 45192 45211 45215 45193 45198 48034 45211 45213 45192 45211 45211 45200 45198 45199 45197 45193 45189 45196 45198 45202 47939 45202 45195 47939 45196 45201 47937 45192 45203 45200 45197 45188 45201 45197 45190 47924 45197 45189 ...
result:
ok 2876 numbers
Test #32:
score: 0
Accepted
time: 0ms
memory: 38796kb
input:
3000 3000 2999 2998 2997 2996 2995 2994 2993 2992 2991 2990 2989 2988 2987 2986 2985 2984 2983 2982 2981 2980 2979 2978 2977 2976 2975 2974 2973 2972 2971 2970 2969 2968 2967 2966 2965 2964 2963 2962 2961 2960 2959 2958 2957 2956 2955 2954 2953 2952 2951 2950 2949 2948 2947 2946 2945 2944 2943 2942 ...
output:
2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 2999 ...
result:
ok 3000 numbers
Test #33:
score: 0
Accepted
time: 3ms
memory: 38912kb
input:
2923 2 4 1 6 3 8 5 10 7 12 9 14 11 16 13 18 15 20 17 22 19 24 21 26 23 28 25 30 27 32 29 34 31 36 33 38 35 40 37 42 39 44 41 46 43 48 45 50 47 52 49 54 51 56 53 58 55 60 57 62 59 64 61 66 63 68 65 70 67 72 69 74 71 76 73 78 75 80 77 82 79 84 81 86 83 88 85 90 87 92 89 94 91 96 93 98 95 100 97 102 99...
output:
4270503 4264663 4267582 4258831 4261746 4253007 4255918 4247191 4250098 4241383 4244286 4235583 4238482 4229791 4232686 4224007 4226898 4218231 4221118 4212463 4215346 4206703 4209582 4200951 4203826 4195207 4198078 4189471 4192338 4183743 4186606 4178023 4180882 4172311 4175166 4166607 4169458 4160...
result:
ok 2923 numbers
Test #34:
score: -1
Runtime Error
input:
3000 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:
result:
Subtask #4:
score: 0
Runtime Error
Test #37:
score: 1
Accepted
time: 0ms
memory: 38816kb
input:
3000 491 2002 187 1922 118 94 2031 1317 31 2585 254 902 2066 543 2342 807 176 2522 2225 386 165 2744 2525 2825 1740 469 1082 727 2571 1201 1086 498 1104 2954 591 512 933 1155 850 212 2086 74 816 414 2187 767 1353 1888 1299 1378 562 2174 1845 2726 1139 2573 847 329 1778 715 1604 815 1766 2710 895 811...
output:
5508 3998 5810 4078 5899 5923 3974 4683 5983 3423 5743 5098 3943 5455 3669 5191 5813 3492 3786 5606 5820 3276 3492 3197 4261 5521 4917 5267 3450 4799 4913 5490 4897 3078 5398 5474 5064 4849 5143 5760 3935 5886 5177 5562 3838 5223 4660 4128 4710 4636 5419 3856 4172 3320 4862 3471 5140 5631 4239 5263 ...
result:
ok 3000 numbers
Test #38:
score: 0
Accepted
time: 0ms
memory: 40880kb
input:
3000 88 388 480 313 445 286 200 176 336 151 251 529 154 525 266 507 82 389 367 349 84 394 157 207 76 69 74 214 67 579 515 58 376 483 536 602 604 555 121 390 126 300 194 506 92 71 479 43 544 174 572 328 517 471 295 197 545 224 422 86 118 304 145 511 320 52 68 124 125 569 310 223 178 546 129 36 137 19...
output:
1119 820 729 893 764 918 1003 1026 873 1049 954 689 1045 693 939 711 1109 825 844 861 1105 824 1038 993 1107 1113 1109 990 1112 657 716 1118 843 747 703 640 639 683 1064 830 1059 906 999 726 1087 1097 750 1117 703 1016 679 882 724 757 908 993 708 972 805 1080 1053 904 1030 735 891 1092 1081 1048 104...
result:
ok 3000 numbers
Test #39:
score: 0
Accepted
time: 0ms
memory: 38560kb
input:
3000 4 3 2 5 1 6 79 59 67 51 50 66 71 25 65 8 37 57 78 7 24 39 9 55 62 18 61 77 75 28 31 58 15 36 23 19 35 76 48 38 72 34 52 32 44 74 49 20 69 12 45 33 13 73 68 11 14 17 56 21 30 26 16 10 27 54 22 46 63 41 42 70 43 60 29 40 64 53 47 83 84 80 82 85 86 87 81 88 89 95 90 91 92 94 93 121 106 130 101 124...
output:
5 5 5 7 4 0 72 91 84 97 97 86 84 119 86 134 108 93 83 131 117 107 130 97 95 120 96 91 92 112 110 96 116 106 110 113 108 100 101 108 103 104 103 104 105 106 102 102 108 102 104 101 100 113 111 97 99 99 109 101 101 102 95 90 104 114 99 112 122 111 111 128 110 122 98 108 127 117 112 11 11 15 11 14 14 1...
result:
ok 3000 numbers
Test #40:
score: -1
Runtime Error
input:
3000 1 8 5 7 14 6 16 13 2 9 15 22 19 21 18 3 27 26 4 20 23 34 36 32 38 11 24 28 12 10 42 37 44 33 41 25 47 50 45 17 39 29 56 57 58 53 55 59 31 48 54 65 52 43 62 46 68 49 40 60 74 73 75 77 63 61 72 80 64 66 84 70 86 79 30 83 85 69 92 82 81 89 94 76 96 98 93 35 102 87 51 97 105 78 71 106 90 91 107 100...
output:
result:
Subtask #5:
score: 0
Runtime Error
Test #49:
score: 1
Accepted
time: 70ms
memory: 48928kb
input:
120000 64409 60114 74653 98538 74129 97296 87880 118079 70393 26626 5555 41719 62956 54903 116107 70653 86719 34349 62338 31410 16535 27192 72902 74322 41431 102664 9925 27101 88186 70542 107230 118319 70003 63640 25068 73660 40531 44770 6428 40655 110977 75243 17262 22912 36271 75941 17391 40319 10...
output:
175590 179884 165348 141464 165870 142706 152121 121927 169602 213364 234434 198273 177039 185089 123904 169347 153286 205637 177655 208574 223446 212792 167103 165686 198556 137356 230050 212879 151831 169460 132795 121711 169994 176354 214903 166348 199450 195216 233535 199327 129056 164775 222703...
result:
ok 120000 numbers
Test #50:
score: 0
Accepted
time: 60ms
memory: 44564kb
input:
120000 13559 3838 4987 24153 13213 31061 35267 8519 61807 61048 16262 13121 4972 48224 19029 55573 13860 34106 60824 27813 62867 21104 17994 526 63339 27209 10388 62670 57822 16974 26483 18577 22354 31147 49966 54728 51322 34739 59788 38771 11376 8675 32550 52963 33937 1681 54632 16928 15050 32086 3...
output:
122417 132138 130990 111826 122763 104920 100714 127454 74176 74934 119713 122849 130993 87760 116948 80413 122113 101876 75165 108165 73128 114870 117977 135426 72660 108769 125571 73328 78169 118994 109494 117393 113621 104839 86027 81266 84671 101247 76213 97217 124571 127269 103433 83035 102046 ...
result:
ok 120000 numbers
Test #51:
score: 0
Accepted
time: 37ms
memory: 39572kb
input:
120000 77 26 196 229 39 136 75 133 62 20 264 233 286 273 111 108 68 110 63 209 155 261 195 36 247 5 150 146 280 28 177 31 199 181 287 119 109 135 251 7 142 13 11 157 220 207 235 163 254 210 115 80 240 178 224 168 183 48 124 27 103 272 85 66 89 175 255 192 91 231 241 34 94 79 204 14 33 54 92 169 131 ...
output:
509 559 391 359 544 450 508 453 519 556 331 361 311 323 472 474 509 474 512 385 436 339 396 530 354 555 439 442 331 534 416 531 400 413 332 461 466 449 360 541 445 535 536 439 389 399 380 431 367 398 458 484 379 418 389 424 416 500 449 511 458 366 474 484 472 423 382 414 468 395 392 498 465 471 411 ...
result:
ok 120000 numbers
Test #52:
score: 0
Accepted
time: 18ms
memory: 44724kb
input:
30599 2 3 5 1 13 16 9 12 6 17 21 7 15 8 18 11 30 25 24 28 10 19 22 32 26 36 37 23 39 40 31 42 14 47 20 45 48 35 34 4 51 27 53 41 49 33 59 29 56 43 54 61 55 52 64 60 57 66 58 63 50 68 75 62 74 67 78 70 81 44 71 46 65 80 88 89 84 82 38 93 76 91 69 90 72 99 85 83 101 98 103 97 104 87 77 96 73 79 92 112...
output:
938997 938997 927253 933123 927252 927250 927254 927252 927255 927253 927250 927253 927252 927252 927255 927251 927228 927245 927245 927242 927241 927247 927247 927233 927247 927231 927231 927242 915586 915586 921413 915586 921406 915583 921407 915585 915585 921407 921407 921385 915628 921422 915630...
result:
ok 30599 numbers
Test #53:
score: -1
Runtime Error
input:
108332 1 27 7 8 17 15 34 9 19 25 4 18 32 33 37 23 38 39 43 29 24 21 5 14 16 6 47 28 42 10 55 58 51 20 35 13 49 63 3 48 26 11 30 41 22 36 31 67 60 66 75 44 50 54 70 53 82 69 2 86 65 88 79 87 77 40 71 72 94 92 89 85 78 96 84 56 81 99 64 105 101 73 52 103 12 104 102 57 115 114 46 97 45 111 107 90 95 11...
output:
result:
Subtask #6:
score: 0
Runtime Error
Test #63:
score: 1
Accepted
time: 65ms
memory: 46828kb
input:
120000 78409 31692 99757 2153 106968 77586 62349 25418 74373 14671 25794 25880 90200 66278 54098 60407 31652 105510 71780 38957 75499 21387 98218 69597 24523 8984 82870 36227 37125 12974 546 83252 118526 74768 32287 22401 91745 31029 16928 99610 110162 116002 34309 47294 87742 8671 34228 27900 25321...
output:
161591 208307 140245 237844 133036 162413 177649 214577 165627 225322 214202 214117 149808 173723 185900 179592 208342 134505 168224 201038 164509 218596 141798 170406 215459 230993 157146 203766 202869 227001 239430 156769 121505 165242 207702 217575 148280 208955 223043 140420 129875 124036 205680...
result:
ok 120000 numbers
Test #64:
score: 0
Accepted
time: 55ms
memory: 45388kb
input:
120000 22203 32675 29136 27616 24511 18716 7339 24332 27530 2138 20309 30422 16897 23478 2698 21915 19161 1112 25858 31419 10930 27712 16104 1994 21631 9211 24604 8966 13333 24664 17056 1569 19534 23948 5559 18590 17849 32102 21940 31912 17802 20234 12152 15613 32242 10540 6527 7800 33381 5295 32619...
output:
44909 34437 37975 39494 42598 48390 59766 42778 39583 64965 46798 36698 50206 43632 64402 45193 47944 65984 41261 35709 56169 39412 50995 65097 45478 57885 42517 58128 53766 42460 50047 65514 47575 43172 61528 48514 49254 35044 45177 35234 49297 46876 54937 51479 34911 56544 60550 59280 33778 61777 ...
result:
ok 120000 numbers
Test #65:
score: 0
Accepted
time: 31ms
memory: 39688kb
input:
120000 6 13 16 15 9 5 10 2 4 12 14 7 3 8 11 1 39 23 75 61 28 35 57 77 72 58 31 34 32 27 29 70 80 24 17 74 73 30 40 78 66 47 59 54 67 49 51 62 42 33 21 79 38 76 19 22 69 36 37 26 60 18 48 65 25 68 52 55 20 53 46 56 41 45 50 43 63 71 44 64 81 88 84 89 85 83 82 90 87 86 99 100 101 95 91 98 92 96 93 97 ...
output:
25 19 17 17 20 21 21 22 21 22 23 21 18 22 24 15 115 130 70 83 113 107 88 73 75 86 106 104 105 105 106 82 79 104 108 82 82 104 105 86 85 97 90 90 88 93 92 92 95 95 90 97 95 96 88 88 94 96 96 86 97 82 97 99 84 102 97 97 77 99 95 102 96 95 99 95 112 117 93 112 0 10 14 11 13 12 12 18 12 12 12 12 12 13 1...
result:
ok 120000 numbers
Test #66:
score: 0
Accepted
time: 57ms
memory: 52800kb
input:
120000 14 19 17 9 11 16 10 26 12 27 1 28 22 3 31 4 30 37 5 40 25 7 8 39 38 36 44 18 33 35 42 34 46 49 52 13 55 21 48 50 43 32 53 62 6 64 58 61 47 2 24 72 60 59 75 41 20 74 54 69 23 78 29 68 57 86 65 56 87 85 81 51 45 92 84 80 71 76 70 73 88 98 83 67 94 103 96 102 107 82 89 105 63 100 104 79 91 110 1...
output:
209302975 209063085 209063086 209183040 209183039 209063088 209183038 209063084 209183035 209063085 209183065 209063087 209063087 209183035 209063087 209183033 209063088 209063084 209183031 209063083 209063084 209183028 209183028 209063086 209063086 209063085 209063086 209063084 209063087 209063086 ...
result:
ok 120000 numbers
Test #67:
score: 0
Accepted
time: 12ms
memory: 40024kb
input:
19217 32 33 10 22 34 15 37 41 21 6 11 27 38 26 14 46 12 45 4 1 16 24 2 58 28 5 49 60 25 52 47 63 64 8 7 48 54 72 17 30 74 18 36 9 42 35 50 43 81 82 51 55 77 29 57 69 80 68 84 3 71 67 66 13 93 75 56 102 101 73 19 62 53 86 59 90 110 70 94 114 78 79 107 40 99 20 106 108 44 95 98 31 120 87 128 76 23 109...
output:
2924793 2924793 2943869 2924850 2924795 2943860 2924794 2924784 2924845 2943859 2943857 2924798 2924796 2924797 2943849 2924787 2943851 2924788 2943851 2943969 2943850 2924801 2943967 2924785 2924802 2943847 2924795 2924787 2924799 2924793 2924795 2924525 2924525 2943668 2943668 2924702 2924701 2924...
result:
ok 19217 numbers
Test #68:
score: 0
Accepted
time: 53ms
memory: 53012kb
input:
119993 36 45 26 23 40 24 44 42 15 47 18 16 17 53 9 52 61 31 62 46 48 25 69 33 39 56 3 43 6 29 49 65 71 4 60 50 68 83 59 80 57 41 10 64 14 63 95 90 19 98 79 35 86 73 22 104 81 103 97 100 12 54 88 21 7 1 110 34 115 99 51 119 107 84 27 124 112 102 125 89 20 111 37 120 126 70 76 135 94 92 32 5 58 77 87 ...
output:
69280602 69280594 69400364 69400366 69280600 69400365 69280598 69280599 69400369 69280600 69400366 69400367 69400367 69280598 69400369 69280599 69280593 69280606 69280594 69280601 69280602 69400360 69280591 69280602 69280599 69280601 69400373 69280600 69400370 69280602 69280607 69280602 69280599 694...
result:
ok 119993 numbers
Test #69:
score: 0
Accepted
time: 52ms
memory: 48744kb
input:
120000 120000 119999 119998 119997 119996 119995 119994 119993 119992 119991 119990 119989 119988 119987 119986 119985 119984 119983 119982 119981 119980 119979 119978 119977 119976 119975 119974 119973 119972 119971 119970 119969 119968 119967 119966 119965 119964 119963 119962 119961 119960 119959...
output:
119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999 119999...
result:
ok 120000 numbers
Test #70:
score: 0
Accepted
time: 57ms
memory: 53844kb
input:
120000 2 5 1 3 6 8 4 10 7 12 9 14 11 15 17 13 18 20 16 22 19 23 25 21 27 24 29 26 31 28 33 30 34 36 32 37 39 35 41 38 43 40 45 42 47 44 49 46 51 48 53 50 54 57 52 55 59 56 61 58 63 60 64 66 62 67 68 71 65 69 73 70 76 72 74 78 75 80 77 82 79 84 81 85 88 83 86 90 87 91 92 94 89 95 99 93 96 97 101 98 1...
output:
2847483505 2847243511 2847363507 2847363509 2847243517 2847003531 2847123519 2846763561 2846883545 2846523599 2846643579 2846283645 2846403621 2846283669 2846043701 2846163671 2846043731 2845803769 2845923733 2845563847 2845683807 2845563887 2845323935 2845443889 2845084033 2845203983 2844844139 284...
result:
ok 120000 numbers
Test #71:
score: 0
Accepted
time: 67ms
memory: 55380kb
input:
119981 4 2 6 1 8 3 10 5 12 7 14 9 16 11 18 13 20 15 22 17 24 19 26 21 28 23 30 25 32 27 34 29 36 31 38 33 40 35 42 37 44 39 46 41 48 43 50 45 52 47 54 49 56 51 58 53 60 55 62 57 64 59 66 61 68 63 70 65 72 67 74 69 76 71 78 73 80 75 82 77 84 79 86 81 88 83 90 85 92 87 94 89 96 91 98 93 100 95 102 97 ...
output:
3598800101 3598860090 3598680126 3598800101 3598560155 3598680126 3598440188 3598560155 3598320225 3598440188 3598200266 3598320225 3598080311 3598200266 3597960360 3598080311 3597840413 3597960360 3597720470 3597840413 3597600531 3597720470 3597480596 3597600531 3597360665 3597480596 3597240738 359...
result:
ok 119981 numbers
Test #72:
score: 0
Accepted
time: 54ms
memory: 53352kb
input:
119946 6 4 8 2 10 1 12 3 14 5 16 7 18 9 20 11 22 13 24 15 26 17 28 19 30 21 32 23 34 25 36 27 38 29 40 31 42 33 44 35 46 37 48 39 50 41 52 43 54 45 56 47 58 49 60 51 62 53 64 55 66 57 68 59 70 61 72 63 74 65 76 67 78 69 80 71 82 73 84 75 86 77 88 79 90 81 92 83 94 85 96 87 98 89 100 91 102 93 104 95...
output:
1798380365 1798410351 1798320397 1798410351 1798260429 1798380365 1798200465 1798320397 1798140501 1798260429 1798080541 1798200465 1798020581 1798140501 1797960625 1798080541 1797900669 1798020581 1797840717 1797960625 1797780765 1797900669 1797720817 1797840717 1797660869 1797780765 1797600925 179...
result:
ok 119946 numbers
Test #73:
score: 0
Accepted
time: 659ms
memory: 223468kb
input:
120000 76 154 286 172 37 289 43 214 292 294 114 295 4 207 298 285 240 301 121 27 304 42 58 307 186 52 310 64 309 313 139 123 316 73 201 319 226 235 322 51 3 325 117 112 328 196 126 331 259 144 334 228 297 337 135 124 340 159 288 343 183 237 346 66 217 349 162 280 352 244 253 355 109 262 358 94 241 3...
output:
25679550 25646349 25590239 25620750 25652730 25588971 25650786 25609430 25587702 25586430 25633110 25586431 25658012 25610026 25585162 25588521 25600849 25583890 25630577 25651604 25582617 25647706 25644424 25581347 25613376 25645146 25580073 25641895 25580074 25578803 25624095 25627643 25577530 256...
result:
ok 120000 numbers
Test #74:
score: -1
Runtime Error
input:
120000 1 7 302 10 13 305 2 8 308 4 11 311 5 14 314 16 19 317 17 20 320 22 25 323 23 26 326 28 31 329 29 32 332 34 37 335 35 38 338 40 43 341 41 44 344 46 49 347 47 50 350 52 55 353 53 56 356 58 61 359 59 62 362 64 67 365 65 68 368 70 73 371 71 74 374 76 79 377 77 80 380 82 85 383 83 86 386 88 91 389...
output:
result:
Subtask #7:
score: 0
Runtime Error
Test #77:
score: 1
Accepted
time: 107ms
memory: 50656kb
input:
160000 156129 44024 78756 29278 87562 149300 123196 70741 25925 116249 53359 49347 137544 59439 48232 127147 41052 31626 44660 97719 37885 66347 134332 85073 139849 36111 113810 121127 93752 45066 130996 65422 38934 44349 136076 12511 72314 20980 21351 105513 113673 137965 67830 22590 102572 71782 1...
output:
163870 275974 241243 290718 232439 170702 196805 249255 294066 203753 266636 270647 182463 260557 271759 192861 278935 288360 275331 222287 282100 253653 185683 234931 180170 283869 206199 198885 226253 274920 189023 254572 281043 275633 183949 307453 247687 298984 298614 214501 206342 182069 252167...
result:
ok 160000 numbers
Test #78:
score: 0
Accepted
time: 65ms
memory: 45784kb
input:
160000 22797 18199 8847 23437 1136 44628 1755 11291 2733 23556 32784 53712 3648 51540 32805 791 18971 29366 17196 50717 7815 6138 26644 13034 24962 3805 52475 7464 38251 9503 44998 29826 23740 14671 10131 53937 25247 21167 49338 20973 41097 6837 5351 36978 12101 43624 30096 12057 7773 5379 19659 171...
output:
87668 92266 101623 87031 109386 65841 108707 99172 107728 86915 77688 56762 106809 58934 77666 109661 91492 81104 93263 59761 102638 104314 83827 97424 85509 106643 58012 102986 72230 100951 65487 80650 86729 95785 100320 56561 85226 89295 61153 89487 69390 103599 105082 73508 98348 66868 80385 9838...
result:
ok 160000 numbers
Test #79:
score: 0
Accepted
time: 53ms
memory: 40004kb
input:
160000 102 163 300 78 203 375 219 420 76 346 553 424 344 382 278 267 41 161 418 440 535 49 376 258 85 502 10 182 269 408 479 401 47 332 476 428 155 31 202 311 433 324 556 481 393 465 46 35 8 268 410 96 350 97 551 118 141 211 312 511 223 98 91 550 475 130 353 81 309 20 282 505 499 212 446 512 50 234 ...
output:
1014 954 816 1034 914 744 897 701 1031 773 570 698 771 738 833 843 1056 943 707 690 596 1045 745 850 1012 632 1077 922 844 720 658 725 1038 784 663 708 938 1047 899 805 708 792 599 667 734 679 1027 1035 1057 838 725 988 773 987 612 968 946 889 805 653 878 980 982 620 682 952 776 985 806 1028 831 667...
result:
ok 160000 numbers
Test #80:
score: 0
Accepted
time: 75ms
memory: 51928kb
input:
159950 5 6 10 1 12 2 7 3 18 4 19 22 26 17 13 15 24 23 16 20 30 9 35 31 25 11 36 8 40 27 43 44 32 33 42 49 39 29 45 38 50 37 54 48 47 52 51 59 41 34 28 65 55 53 66 46 14 61 63 21 62 71 74 73 56 57 68 75 79 69 58 72 70 85 78 80 90 83 67 64 76 60 88 84 96 77 87 81 102 97 82 91 105 94 89 93 106 103 104 ...
output:
38677887 38677887 38677845 38716149 38677846 38716146 38677872 38716145 38601293 38639585 38601300 38601295 38601292 38601293 38639574 38601295 38601296 38601296 38601293 38601299 38601296 38639560 38601293 38601296 38601297 38639556 38601296 38639552 38601309 38601305 38601308 38601308 38601304 386...
result:
ok 159950 numbers
Test #81:
score: 0
Accepted
time: 75ms
memory: 52892kb
input:
159757 5 3 9 8 30 29 13 14 15 33 34 37 35 19 22 23 16 4 26 10 20 32 38 39 12 40 43 36 55 24 41 1 11 18 42 48 7 59 49 44 53 56 61 28 58 65 60 17 74 54 73 25 2 79 80 77 70 67 86 6 46 45 68 21 85 78 51 63 94 66 69 81 95 90 97 52 75 91 31 106 83 104 84 72 112 102 99 114 87 88 101 103 107 96 111 105 113 ...
output:
248288728 248288729 247969441 247969441 247969345 247969345 247969413 247969413 247969413 247969347 247969347 247969345 247969346 247969405 247969400 247969400 247969405 248129045 247969400 247969404 247969405 247969352 247969355 247969355 247969399 247969356 247969354 247969352 247969342 247969393 ...
result:
ok 159757 numbers
Test #82:
score: 0
Accepted
time: 43ms
memory: 51144kb
input:
96278 20 15 8 24 44 42 6 39 3 5 4 31 21 43 13 2 10 23 41 61 11 55 33 34 19 22 38 67 12 37 52 36 32 65 35 60 14 74 45 16 70 1 66 64 17 85 49 54 72 28 87 57 48 71 77 95 59 82 29 86 46 99 104 94 53 7 96 90 93 109 47 91 102 63 25 79 113 89 116 83 100 92 98 18 124 103 118 56 9 40 126 30 27 121 129 119 80...
output:
54668639 54668643 54668685 54668638 54476522 54476523 54572775 54476526 54572776 54572775 54572775 54476536 54572658 54476530 54572660 54572770 54572663 54572659 54476533 54476520 54572657 54476526 54476537 54476537 54572651 54572653 54476536 54476522 54572649 54476536 54476534 54476535 54476534 544...
result:
ok 96278 numbers
Test #83:
score: 0
Accepted
time: 88ms
memory: 52176kb
input:
159995 37 50 56 40 28 57 14 11 62 3 52 16 54 59 48 47 63 70 6 17 2 13 78 30 77 73 15 33 36 64 67 10 87 55 46 8 31 84 41 4 88 23 85 66 5 71 99 51 7 92 76 74 49 96 60 12 19 75 65 104 32 83 97 119 116 121 27 81 102 26 106 20 123 42 9 113 39 89 112 61 53 127 107 82 134 126 132 111 133 94 129 79 117 93 1...
output:
104370047 104370035 104370030 104370043 104370052 104370032 104529811 104529813 104370030 104529819 104370036 104529810 104370036 104370036 104370036 104370036 104370037 104370031 104529809 104529805 104529809 104529805 104370028 104370049 104370029 104370032 104529801 104370046 104370044 104370041 ...
result:
ok 159995 numbers
Test #84:
score: 0
Accepted
time: 80ms
memory: 55072kb
input:
160000 2 4 1 5 7 3 8 10 6 12 9 14 11 16 13 17 19 15 21 18 23 20 24 26 22 29 25 27 31 28 32 34 30 36 33 38 35 41 37 39 42 45 40 43 47 44 48 50 46 51 53 49 55 52 57 54 61 56 58 59 63 60 65 62 66 69 64 67 71 68 72 73 76 70 74 78 75 80 77 81 83 79 84 87 82 85 89 86 91 88 93 90 95 92 96 98 94 100 97 161 ...
output:
5146282890 5145962896 5146122892 5145962900 5145642912 5145802902 5145642922 5145322940 5145482924 5145002978 5145162958 5144683024 5144843000 5144363078 5144523050 5144363106 5144043142 5144203108 5143723216 5143883178 5143403298 5143563256 5143403340 5143083390 5143243342 5142763492 5142923440 514...
result:
ok 160000 numbers
Test #85:
score: 0
Accepted
time: 70ms
memory: 62300kb
input:
159910 2 4 1 6 3 8 5 10 7 12 9 14 11 16 13 18 15 20 17 22 19 24 21 26 23 28 25 30 27 32 29 34 31 36 33 38 35 40 37 42 39 44 41 46 43 48 45 50 47 52 49 54 51 56 53 58 55 60 57 62 59 64 61 66 63 68 65 70 67 72 69 74 71 76 73 78 75 80 77 82 79 84 81 86 83 88 85 90 87 92 89 94 91 96 93 98 95 100 97 102 ...
output:
12785524095 12785204281 12785364187 12784884475 12785044377 12784564677 12784724575 12784244887 12784404781 12783925105 12784084995 12783605331 12783765217 12783285565 12783445447 12782965807 12783125685 12782646057 12782805931 12782326315 12782486185 12782006581 12782166447 12781686855 12781846717 ...
result:
ok 159910 numbers
Test #86:
score: 0
Accepted
time: 81ms
memory: 58612kb
input:
159988 4 6 2 8 1 10 3 12 5 14 7 16 9 18 11 20 13 22 15 24 17 26 19 28 21 30 23 32 25 34 27 36 29 38 31 40 33 42 35 44 37 46 39 48 41 50 43 52 45 54 47 56 49 58 51 60 53 62 55 64 57 66 59 68 61 70 63 72 65 74 67 76 69 78 71 80 73 82 75 84 77 86 79 88 81 90 83 92 85 94 87 96 89 98 91 100 93 102 95 104...
output:
4266053355 4265946700 4266053355 4265840047 4266000027 4265733397 4265893373 4265626750 4265786722 4265520105 4265680073 4265413463 4265573427 4265306824 4265466784 4265200187 4265360143 4265093553 4265253505 4264986922 4265146870 4264880293 4265040237 4264773667 4264933607 4264667044 4264826980 426...
result:
ok 159988 numbers
Test #87:
score: -1
Runtime Error
input:
160000 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:
result:
Subtask #8:
score: 0
Runtime Error
Test #91:
score: 1
Accepted
time: 104ms
memory: 52516kb
input:
160000 7989 3230 94580 28590 58488 86098 59555 158400 130649 156687 57081 22926 58794 152913 99176 138390 158950 59527 61013 152361 9912 57515 97450 101904 146743 87841 15973 93582 31920 40884 124306 16146 93998 18246 74431 144546 6295 65109 44856 101456 49455 114289 103755 41963 2986 136807 158320 ...
output:
312034 316798 225422 291411 261514 233905 260447 161606 189356 163319 262914 297066 261205 167095 220829 181618 161065 260469 258986 167649 310071 262475 222555 218104 173270 232159 304006 226420 288063 279100 195707 303830 226007 301730 245568 175476 313670 254889 275127 218560 270528 205731 216264...
result:
ok 160000 numbers
Test #92:
score: 0
Accepted
time: 67ms
memory: 43388kb
input:
160000 23113 26233 19410 26687 19787 22 29546 27739 334 6151 35792 11265 14873 31258 20486 29802 28583 23418 2177 27135 28848 8119 29691 16426 14447 12313 2795 33184 28661 13800 24547 33616 14567 14612 21316 22186 25013 6119 13443 21982 10552 36576 6563 4869 26173 24977 26108 5261 15831 11452 12677 ...
output:
50613 47494 54314 47042 53937 73919 44186 45992 73431 67571 37943 62455 58848 42478 53239 43934 45150 50308 71534 46597 44889 65593 44050 57290 59266 61399 70910 40566 45078 59912 49182 40138 59146 59102 52409 51540 48720 67577 60262 51744 63147 37190 67132 68821 47566 48759 47631 68427 57884 62248 ...
result:
ok 160000 numbers
Test #93:
score: 0
Accepted
time: 41ms
memory: 39932kb
input:
160000 6 13 15 2 8 9 5 30 31 23 3 22 27 37 35 41 25 26 33 34 18 36 11 29 10 4 39 7 32 21 12 17 19 28 42 24 40 14 16 38 1 20 44 43 51 65 62 60 45 57 63 59 50 61 55 49 48 68 64 58 53 66 67 56 47 52 46 54 78 69 75 77 80 76 72 79 71 73 70 74 92 94 86 102 91 98 84 104 101 83 100 99 97 87 82 90 103 81 89 ...
output:
78 72 71 79 76 76 75 60 60 65 72 66 64 59 60 57 62 62 62 62 61 64 62 61 61 58 68 59 65 59 61 61 62 66 75 62 75 56 57 76 42 67 1 1 41 27 29 30 45 33 32 31 35 33 32 33 33 37 37 32 32 41 41 30 26 30 25 33 13 23 16 15 16 14 15 18 14 15 13 16 35 34 40 28 34 32 37 30 30 35 31 31 30 33 31 32 38 29 32 35 35...
result:
ok 160000 numbers
Test #94:
score: 0
Accepted
time: 90ms
memory: 53440kb
input:
159991 14 3 10 7 8 24 15 18 23 21 1 12 20 16 22 11 5 29 9 33 27 28 4 32 13 37 17 35 19 40 39 46 48 44 31 52 34 45 6 49 60 62 63 42 50 65 36 2 57 70 43 59 25 68 66 55 51 61 71 54 74 58 83 78 56 82 79 69 64 26 77 88 80 73 94 75 86 76 87 72 96 92 90 47 41 105 101 107 104 97 108 109 110 103 38 67 114 85...
output:
370951293 370951303 370951297 370951299 370951299 370951288 370951296 370951294 370951290 370951291 371111263 370951294 370951293 370951294 370951295 370951291 370951290 370951256 370951278 370631425 370791348 370791348 370791356 370631428 370791361 370631427 370791363 370631429 370791363 370631428 ...
result:
ok 159991 numbers
Test #95:
score: 0
Accepted
time: 79ms
memory: 53000kb
input:
159507 5 31 32 33 4 20 13 26 42 30 39 37 2 29 25 38 45 23 15 34 12 8 49 40 47 55 51 46 63 57 21 18 14 19 56 53 43 24 52 65 36 16 1 76 62 50 41 69 60 9 79 67 78 81 88 80 77 83 72 85 48 87 93 71 70 68 101 28 59 7 99 84 64 3 105 108 27 102 92 61 113 96 110 98 73 75 118 119 122 22 115 125 97 86 6 106 12...
output:
187114545 186795796 186795796 186795796 186955200 186795805 186955035 186795801 186795764 186795792 186795767 186795768 186955218 186795791 186795792 186795771 186795709 186795767 186954991 186795772 186954990 186955090 186795711 186795757 186795713 186795708 186795711 186795711 186795703 186795708 ...
result:
ok 159507 numbers
Test #96:
score: 0
Accepted
time: 87ms
memory: 52888kb
input:
157783 15 13 46 41 42 48 26 30 32 34 5 18 55 45 12 27 65 38 29 8 4 63 9 10 71 62 52 7 14 64 76 21 72 49 47 82 44 79 43 51 54 19 74 31 58 80 90 75 25 57 56 84 88 70 98 22 81 3 73 60 53 35 95 96 83 107 94 108 59 113 17 97 20 68 91 104 77 122 28 23 124 85 33 37 118 100 111 6 36 102 105 136 103 132 141 ...
output:
118681925 118681926 118366805 118366809 118366809 118366806 118366821 118366818 118366817 118366816 118524416 118524408 118366756 118366802 118524381 118366810 118366750 118366805 118366807 118524380 118524381 118366755 118524380 118524380 118366736 118366753 118366760 118524365 118524369 118366757 ...
result:
ok 157783 numbers
Test #97:
score: 0
Accepted
time: 69ms
memory: 50352kb
input:
160000 160000 159999 159998 159997 159996 159995 159994 159993 159992 159991 159990 159989 159988 159987 159986 159985 159984 159983 159982 159981 159980 159979 159978 159977 159976 159975 159974 159973 159972 159971 159970 159969 159968 159967 159966 159965 159964 159963 159962 159961 159960 159959...
output:
159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999 159999...
result:
ok 160000 numbers
Test #98:
score: 0
Accepted
time: 84ms
memory: 59124kb
input:
160000 2 4 1 7 3 5 8 10 6 11 14 9 12 16 13 18 15 20 17 22 19 24 21 26 23 28 25 30 27 32 29 34 31 36 33 38 35 39 41 37 42 44 40 45 47 43 49 46 50 52 48 54 51 55 58 53 56 59 60 62 57 65 61 63 67 64 68 71 66 69 73 70 74 76 72 78 75 79 81 77 82 84 80 86 83 88 85 90 87 91 92 94 89 95 97 93 99 96 101 98 1...
output:
5065791180 5065471186 5065631182 5065151200 5065311192 5065311198 5065151210 5064831228 5064991212 5064831244 5064511268 5064671246 5064671266 5064191322 5064351294 5063871384 5064031352 5063551454 5063711418 5063231532 5063391492 5062911618 5063071574 5062591712 5062751664 5062271814 5062431762 506...
result:
ok 160000 numbers
Test #99:
score: 0
Accepted
time: 89ms
memory: 61240kb
input:
159947 4 2 6 1 8 3 10 5 12 7 14 9 16 11 18 13 20 15 22 17 24 19 26 21 28 23 30 25 32 27 34 29 36 31 38 33 40 35 42 37 44 39 46 41 48 43 50 45 52 47 54 49 56 51 58 53 60 55 62 57 64 59 66 61 68 63 70 65 72 67 74 69 76 71 78 73 80 75 82 77 84 79 86 81 88 83 90 85 92 87 94 89 96 91 98 93 100 95 102 97 ...
output:
6395680730 6395760702 6395520789 6395680730 6395360852 6395520789 6395200919 6395360852 6395040990 6395200919 6394881065 6395040990 6394721144 6394881065 6394561227 6394721144 6394401314 6394561227 6394241405 6394401314 6394081500 6394241405 6393921599 6394081500 6393761702 6393921599 6393601809 639...
result:
ok 159947 numbers
Test #100:
score: 0
Accepted
time: 88ms
memory: 58428kb
input:
159966 6 4 8 2 10 1 12 3 14 5 16 7 18 9 20 11 22 13 24 15 26 17 28 19 30 21 32 23 34 25 36 27 38 29 40 31 42 33 44 35 46 37 48 39 50 41 52 43 54 45 56 47 58 49 60 51 62 53 64 55 66 57 68 59 70 61 72 63 74 65 76 67 78 69 80 71 82 73 84 75 86 77 88 79 90 81 92 83 94 85 96 87 98 89 100 91 102 93 104 95...
output:
3198640145 3198680136 3198560167 3198680136 3198480189 3198640145 3198400215 3198560167 3198320241 3198480189 3198240271 3198400215 3198160301 3198320241 3198080335 3198240271 3198000369 3198160301 3197920407 3198080335 3197840445 3198000369 3197760487 3197920407 3197680529 3197840445 3197600575 319...
result:
ok 159966 numbers
Test #101:
score: 0
Accepted
time: 952ms
memory: 393480kb
input:
160000 327 232 331 42 58 334 333 198 337 51 112 340 243 63 343 252 25 346 189 54 349 97 238 352 13 69 355 300 91 358 336 37 361 225 4 364 114 291 367 306 61 370 39 319 373 117 150 376 115 132 379 34 235 382 159 96 385 10 196 388 126 318 391 156 109 394 246 111 397 45 360 400 31 43 403 186 70 406 102...
output:
39223276 39253372 39221809 39305289 39301427 39220346 39220346 39261963 39218881 39301577 39285767 39217416 39247493 39297795 39215954 39244118 39306948 39214490 39262151 39298699 39213025 39287106 39247586 39211561 39307694 39293489 39210097 39227287 39287350 39208634 39215412 39300360 39207170 392...
result:
ok 160000 numbers
Test #102:
score: -1
Runtime Error
input:
160000 1 8 11 348 14 17 351 2 9 354 3 12 357 5 15 360 6 18 363 20 23 366 21 24 369 26 29 372 27 30 375 32 35 378 33 36 381 38 41 384 39 42 387 44 47 390 45 48 393 50 53 396 51 54 399 56 59 402 57 60 405 62 65 408 63 66 411 68 71 414 69 72 417 74 77 420 75 78 423 80 83 426 81 84 429 86 89 432 87 90 4...
output:
result:
Subtask #9:
score: 0
Runtime Error
Test #105:
score: 1
Accepted
time: 139ms
memory: 51776kb
input:
200000 189428 64342 135921 32395 188535 169507 64482 42272 25764 6325 147516 156955 59264 22488 40453 177478 186347 2150 25385 186802 67560 112182 134171 51505 110481 157235 97911 134436 108490 140324 72997 193232 172756 69488 181034 73959 63101 176324 65239 102013 179706 139850 57553 85209 101805 6...
output:
210571 335656 264078 367603 211466 230493 335515 357724 374229 393674 252487 243049 340731 377502 359542 222532 213664 397847 374604 213212 332441 287820 265832 348489 289520 242777 302088 265570 291509 259686 326998 206798 227263 330504 218989 326035 336882 223698 334748 297985 220321 260160 342422...
result:
ok 200000 numbers
Test #106:
score: 0
Accepted
time: 138ms
memory: 52332kb
input:
200000 686 4240 5239 2525 2708 1271 4252 3766 1836 242 5151 5517 3387 1 3156 518 745 1170 2461 4836 4994 3623 3956 1220 5123 1398 4861 875 4825 2265 1578 4644 2613 5584 341 978 4155 4823 2209 3282 1364 608 1460 2994 4689 1151 4658 4589 2149 3590 4758 1105 1101 1075 2606 1631 2093 179 735 482 1482 46...
output:
10500 6930 5932 8643 8461 9895 6921 7404 9329 10919 6026 5663 7782 11223 8013 10641 10416 9992 8706 6346 6189 7551 7221 9938 6064 9762 6324 10277 6358 8897 9581 6540 8554 5619 10798 10170 7026 6365 8950 7890 9787 10528 9695 8178 6504 9991 6535 6601 9008 7588 6441 10031 10034 10059 8561 9523 9064 109...
result:
ok 200000 numbers
Test #107:
score: 0
Accepted
time: 68ms
memory: 42464kb
input:
200000 146 252 79 434 619 92 313 75 247 22 389 439 258 433 522 278 111 483 152 234 603 569 41 612 3 160 653 292 350 54 102 448 28 164 2 291 38 99 68 319 582 514 177 276 156 104 404 602 641 67 279 49 644 400 456 435 346 382 42 597 238 44 660 335 629 491 383 103 481 595 150 527 358 151 274 21 634 609 ...
output:
1175 1070 1244 890 706 1226 1010 1239 1074 1291 938 891 1065 895 811 1044 1202 851 1163 1082 736 769 1261 730 1312 1154 694 1032 977 1244 1203 890 1266 1150 1287 1035 1256 1205 1229 1015 771 834 1138 1048 1153 1198 937 758 726 1219 1048 1233 727 940 895 911 987 954 1234 769 1073 1230 723 997 748 867...
result:
ok 200000 numbers
Test #108:
score: 0
Accepted
time: 89ms
memory: 50628kb
input:
196285 6 8 5 10 18 11 1 20 17 22 15 16 23 3 14 2 13 7 29 31 26 25 36 27 19 35 9 34 30 24 33 28 37 4 41 38 32 46 45 52 43 47 12 56 21 40 59 44 51 60 61 53 66 50 64 57 48 65 67 54 69 42 75 39 68 74 78 49 77 72 83 76 55 73 79 87 86 62 85 80 82 71 91 81 70 97 92 90 84 102 98 94 100 88 101 109 105 111 11...
output:
36314443 36314442 36314442 36314442 36239528 36276992 36277014 36239530 36239529 36239514 36239525 36239525 36239516 36276986 36239524 36276985 36239525 36276973 36239518 36239517 36239519 36239519 36239515 36239519 36239526 36239517 36276965 36239518 36239519 36239516 36239520 36239518 36239524 362...
result:
ok 196285 numbers
Test #109:
score: 0
Accepted
time: 107ms
memory: 59980kb
input:
199991 7 23 5 12 14 29 28 30 20 36 11 4 2 32 19 16 42 18 13 1 10 24 40 50 17 21 43 38 35 47 44 8 27 61 41 63 52 9 60 48 6 31 67 53 15 70 55 65 22 51 49 26 37 34 78 72 3 73 77 56 64 62 33 81 86 88 74 45 68 57 91 90 93 100 83 85 46 101 82 103 84 105 99 110 87 71 112 107 59 108 113 94 104 66 106 79 80 ...
output:
397871221 397871206 397871221 397871217 397871216 397871123 397871123 397871124 397871179 397871120 397871181 397871183 398071056 397871126 397871179 397871181 397871027 397871140 397871140 398070982 397871139 397871144 397871034 397871028 397871138 397871141 397871036 397871098 397871097 397871035 ...
result:
ok 199991 numbers
Test #110:
score: 0
Accepted
time: 104ms
memory: 55384kb
input:
199991 19 42 22 5 29 33 34 12 49 8 51 48 14 35 43 27 56 55 7 26 41 37 23 31 46 52 39 24 67 32 70 1 13 54 62 58 63 66 10 28 30 38 80 40 64 21 60 75 25 44 9 81 87 47 79 83 73 17 6 65 100 90 103 50 88 99 89 76 85 84 101 20 18 36 105 53 16 82 92 3 110 71 121 111 117 107 78 124 114 118 113 4 77 11 102 12...
output:
231264300 231264278 231264297 231264319 231264292 231264289 231264289 231264310 231264278 231264312 231264278 231264278 231264307 231264289 231264284 231264289 231264279 231264279 231264304 231264288 231264284 231264287 231264288 231264287 231264287 231264288 231264286 231264284 231264280 231264284 ...
result:
ok 199991 numbers
Test #111:
score: 0
Accepted
time: 110ms
memory: 56692kb
input:
199997 20 42 45 24 23 7 37 6 1 52 27 51 2 12 38 5 47 43 65 36 59 50 77 55 9 35 72 75 13 57 19 22 14 63 78 91 54 87 73 53 80 82 49 48 58 15 4 17 84 70 103 64 100 71 90 89 61 28 79 10 76 67 3 56 16 119 83 95 39 97 44 69 109 114 116 122 34 113 18 92 98 129 94 112 130 115 121 128 25 11 133 96 124 85 123...
output:
162048488 161648901 161648899 161649680 161649680 161848829 161649508 161848828 161848885 161648900 161649680 161648901 161848875 161848755 161649511 161848824 161648908 161648908 161648897 161649508 161648903 161648906 161648889 161648906 161848747 161649505 161648896 161648894 161848743 161648906 ...
result:
ok 199997 numbers
Test #112:
score: 0
Accepted
time: 107ms
memory: 62120kb
input:
200000 5 1 2 3 7 4 9 6 11 8 12 15 10 13 17 14 18 20 16 21 23 19 25 22 27 24 29 26 30 33 28 31 35 32 38 34 36 39 42 37 40 45 41 43 48 44 46 50 47 51 53 49 55 52 57 54 59 56 61 58 63 60 65 62 68 64 66 69 71 67 74 70 72 75 77 73 80 76 78 81 83 79 85 82 87 84 89 86 91 88 93 90 96 92 94 98 95 100 97 126 ...
output:
8067935584 8068135582 8068135582 8068135582 8067535602 8067735592 8067135628 8067335614 8066735662 8066935644 8066735680 8066335706 8066535682 8066535704 8065935764 8066135734 8065935794 8065535832 8065735796 8065535868 8065135912 8065335870 8064736002 8064935956 8064336100 8064536050 8063936206 806...
result:
ok 200000 numbers
Test #113:
score: 0
Accepted
time: 103ms
memory: 63960kb
input:
199965 2 4 1 6 3 8 5 10 7 12 9 14 11 16 13 18 15 20 17 22 19 24 21 26 23 28 25 30 27 32 29 34 31 36 33 38 35 40 37 42 39 44 41 46 43 48 45 50 47 52 49 54 51 56 53 58 55 60 57 62 59 64 61 66 63 68 65 70 67 72 69 74 71 76 73 78 75 80 77 82 79 84 81 86 83 88 85 90 87 92 89 94 91 96 93 98 95 100 97 102 ...
output:
19992900630 19992500706 19992700667 19992100790 19992300747 19991700882 19991900835 19991300982 19991500931 19990901090 19991101035 19990501206 19990701147 19990101330 19990301267 19989701462 19989901395 19989301602 19989501531 19988901750 19989101675 19988501906 19988701827 19988102070 19988301987 ...
result:
ok 199965 numbers
Test #114:
score: 0
Accepted
time: 101ms
memory: 65896kb
input:
199915 4 6 2 8 1 10 3 12 5 14 7 16 9 18 11 20 13 22 15 24 17 26 19 28 21 30 23 32 25 34 27 36 29 38 31 40 33 42 35 44 37 46 39 48 41 50 43 52 45 54 47 56 49 58 51 60 53 62 55 64 57 66 59 68 61 70 63 72 65 74 67 76 69 78 71 80 73 82 75 84 77 86 79 88 81 90 83 92 85 94 87 96 89 98 91 100 93 102 95 104...
output:
6661034523 6660901250 6661034523 6660767979 6660967886 6660634711 6660834614 6660501446 6660701345 6660368183 6660568078 6660234923 6660434814 6660101666 6660301553 6659968411 6660168294 6659835159 6660035038 6659701910 6659901785 6659568663 6659768534 6659435419 6659635286 6659302178 6659502041 665...
result:
ok 199915 numbers
Test #115:
score: -1
Runtime Error
input:
200000 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:
result:
Subtask #10:
score: 0
Runtime Error
Test #119:
score: 1
Accepted
time: 137ms
memory: 52504kb
input:
200000 158297 88332 32154 18823 78105 64143 62884 62114 70506 92348 14704 147260 38615 93431 114389 158203 10051 129946 33477 195334 112976 69424 116449 186713 106467 22965 82228 33800 183485 162975 88312 60060 95901 96229 136061 107562 144911 198696 17504 21159 97258 64932 163868 192263 117581 1035...
output:
241703 311667 367851 381181 321895 335858 337116 337885 329496 307659 385294 252749 361386 306578 285621 241810 389941 270065 366520 204684 287031 330573 283562 213307 293538 377016 317771 366185 216538 237047 311687 339925 304106 303779 263958 292448 255110 201340 382461 378809 302749 335054 236165...
result:
ok 200000 numbers
Test #120:
score: 0
Accepted
time: 92ms
memory: 47764kb
input:
200000 41382 29005 29488 16012 1493 20730 48507 23793 48715 27497 4752 32420 21888 14610 19270 35744 40971 640 22319 3535 36749 9190 13616 43643 50549 18705 29128 22273 32301 29697 12391 32512 21310 9872 13295 35651 16253 28994 13341 47292 44718 31011 13943 21864 48386 31748 48197 45055 39322 37259 ...
output:
63957 76333 75851 89325 103851 84609 56838 81545 56632 77841 100581 72924 83447 90721 86064 69604 64378 104686 83018 101791 68602 96137 91712 61715 54814 86626 76217 83063 73048 75651 92929 72842 84021 95445 92025 69707 89073 76350 91977 58080 60653 74341 91375 83468 56991 73606 57180 60319 66043 68...
result:
ok 200000 numbers
Test #121:
score: 0
Accepted
time: 60ms
memory: 40236kb
input:
200000 2 19 15 20 7 12 13 14 18 11 21 9 10 16 22 23 5 17 8 6 4 24 3 1 25 26 37 33 35 27 32 28 31 29 38 30 34 36 44 41 39 40 42 43 60 48 45 73 71 58 68 54 47 69 70 64 65 50 56 53 49 52 59 57 51 66 63 67 62 46 61 55 72 108 115 106 112 76 100 113 109 87 91 101 104 88 85 90 98 80 75 95 79 111 77 86 92 8...
output:
45 29 32 30 38 34 34 34 33 31 36 31 31 36 39 39 28 35 27 26 25 44 24 23 0 0 12 15 14 20 15 19 16 18 22 16 19 20 5 7 8 8 9 9 42 54 68 32 33 42 36 44 48 38 38 39 39 44 41 41 42 42 44 43 40 47 45 48 44 32 46 39 59 48 42 48 45 76 53 47 48 63 60 53 51 60 60 60 55 62 64 59 62 59 62 60 63 61 63 58 59 65 65...
result:
ok 200000 numbers
Test #122:
score: 0
Accepted
time: 104ms
memory: 60992kb
input:
200000 2 1 20 18 4 8 27 3 9 14 29 21 19 11 7 32 13 17 25 23 22 12 10 30 28 46 15 33 35 47 51 41 53 37 5 34 56 36 42 40 26 48 57 39 62 59 16 43 6 44 63 72 67 55 69 75 31 77 76 52 50 78 82 54 81 45 64 49 85 58 80 89 24 73 65 61 93 88 86 83 79 91 60 96 98 104 101 107 109 71 74 105 94 102 92 115 100 113...
output:
1 1 588050051 588050052 588050219 588050062 587650342 587850330 587850237 587850233 587650346 587850231 587850229 587850232 587850231 587650348 587850230 587850229 587650351 587850232 587850232 587850226 587850225 587650356 587650355 587650161 587850109 587650290 587650289 587650164 587650161 587650...
result:
ok 200000 numbers
Test #123:
score: 0
Accepted
time: 80ms
memory: 57460kb
input:
161112 28 26 1 31 3 23 27 6 35 43 29 7 30 37 15 18 11 9 12 42 16 54 57 4 25 46 34 36 55 59 14 40 21 2 13 68 61 63 47 19 45 32 44 67 17 10 73 22 52 39 65 83 20 88 62 86 5 77 79 80 85 56 8 51 53 38 78 33 64 95 48 72 96 100 69 92 91 97 58 111 41 102 24 94 71 87 66 101 120 60 90 74 114 121 124 117 128 4...
output:
191121827 191121828 191282936 191121828 191282890 191121865 191121830 191121885 191121829 191121822 191121831 191121879 191121832 191121830 191121865 191121863 191121867 191121868 191121868 191121831 191121866 191121726 191121724 191282789 191121801 191121802 191121805 191121806 191121730 191121729 ...
result:
ok 161112 numbers
Test #124:
score: 0
Accepted
time: 108ms
memory: 58480kb
input:
199997 7 30 19 24 50 35 31 13 6 37 45 10 46 12 41 54 63 38 49 5 56 59 11 67 32 26 20 18 75 61 14 23 65 73 1 8 80 51 79 9 42 2 83 43 93 91 95 3 68 34 97 88 69 25 66 84 60 92 36 62 96 16 77 4 82 76 85 28 108 110 72 21 94 44 123 117 29 55 39 116 113 15 58 107 48 134 103 47 87 133 124 105 118 102 128 86...
output:
189389727 189389629 189389641 189389635 189389520 189389604 189389607 189389652 189389656 189389606 189389529 189389653 189389530 189389651 189389533 189387752 188989854 189189758 189189716 189189792 189189004 188989861 189189791 188989857 189189757 189189758 189189762 189189761 188989854 188989863 ...
result:
ok 199997 numbers
Test #125:
score: 0
Accepted
time: 91ms
memory: 54900kb
input:
200000 200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959...
output:
199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999 199999...
result:
ok 200000 numbers
Test #126:
score: 0
Accepted
time: 105ms
memory: 61760kb
input:
200000 3 1 5 2 7 4 8 10 6 12 9 14 11 16 13 18 15 19 20 23 17 21 25 22 27 24 30 26 28 32 29 33 36 31 34 37 39 35 41 38 43 40 44 46 42 48 45 49 51 47 54 50 52 56 53 59 55 57 61 58 63 60 64 66 62 68 65 69 71 67 72 73 75 70 77 74 79 76 80 82 78 83 85 81 87 84 89 86 91 88 93 90 95 92 96 98 94 100 97 103 ...
output:
7879563338 7879763336 7879163348 7879363342 7878763366 7878963356 7878763376 7878363394 7878563378 7877963432 7878163412 7877563478 7877763454 7877163532 7877363504 7876763594 7876963562 7876763626 7876763626 7876363668 7876563628 7876563666 7875963758 7876163712 7875563856 7875763806 7875163962 787...
result:
ok 200000 numbers
Test #127:
score: 0
Accepted
time: 94ms
memory: 66448kb
input:
199934 4 2 6 1 8 3 10 5 12 7 14 9 16 11 18 13 20 15 22 17 24 19 26 21 28 23 30 25 32 27 34 29 36 31 38 33 40 35 42 37 44 39 46 41 48 43 50 45 52 47 54 49 56 51 58 53 60 55 62 57 64 59 66 61 68 63 70 65 72 67 74 69 76 71 78 73 80 75 82 77 84 79 86 81 88 83 90 85 92 87 94 89 96 91 98 93 100 95 102 97 ...
output:
9993301123 9993401089 9993101195 9993301123 9992901271 9993101195 9992701351 9992901271 9992501435 9992701351 9992301523 9992501435 9992101615 9992301523 9991901711 9992101615 9991701811 9991901711 9991501915 9991701811 9991302023 9991501915 9991102135 9991302023 9990902251 9991102135 9990702371 999...
result:
ok 199934 numbers
Test #128:
score: 0
Accepted
time: 108ms
memory: 67792kb
input:
199963 6 4 8 2 10 1 12 3 14 5 16 7 18 9 20 11 22 13 24 15 26 17 28 19 30 21 32 23 34 25 36 27 38 29 40 31 42 33 44 35 46 37 48 39 50 41 52 43 54 45 56 47 58 49 60 51 62 53 64 55 66 57 68 59 70 61 72 63 74 65 76 67 78 69 80 71 82 73 84 75 86 77 88 79 90 81 92 83 94 85 96 87 98 89 100 91 102 93 104 95...
output:
4998150172 4998200162 4998050195 4998200162 4997950219 4998150172 4997850246 4998050195 4997750274 4997950219 4997650305 4997850246 4997550337 4997750274 4997450372 4997650305 4997350408 4997550337 4997250447 4997450372 4997150487 4997350408 4997050530 4997250447 4996950574 4997150487 4996850621 499...
result:
ok 199963 numbers
Test #129:
score: 0
Accepted
time: 1417ms
memory: 508592kb
input:
200000 192 372 315 336 379 102 198 382 13 97 385 231 28 388 265 222 391 234 258 394 364 162 397 6 256 400 367 37 403 205 70 406 229 190 409 217 348 412 354 175 415 87 387 418 153 312 421 289 277 424 141 184 427 268 150 430 369 345 433 207 135 436 48 168 439 375 94 442 291 223 445 82 9 448 10 301 451...
output:
53959919 53863218 53883178 53875925 53859997 53949561 53920427 53858388 53974006 53950581 53856781 53908595 53969114 53855174 53897285 53910818 53853564 53906360 53898609 53851955 53862577 53928146 53850349 53971534 53898305 53848741 53860408 53962713 53847133 53913139 53952880 53845526 53904953 539...
result:
ok 200000 numbers
Test #130:
score: -1
Runtime Error
input:
200000 1 3 391 4 6 394 7 9 397 10 12 400 13 15 403 16 18 406 19 21 409 22 24 412 25 27 415 28 30 418 31 33 421 34 36 424 37 39 427 40 42 430 43 45 433 46 48 436 49 51 439 52 54 442 55 57 445 58 60 448 61 63 451 64 66 454 67 69 457 70 72 460 73 75 463 76 78 466 79 81 469 82 84 472 85 87 475 88 90 478...