QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#330266 | #6537. One, Two, Three | AFewSuns | AC ✓ | 119ms | 38208kb | C++14 | 3.6kb | 2024-02-17 14:10:36 | 2024-02-17 14:10:37 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
namespace my_std{
#define ll long long
#define bl bool
ll my_pow(ll a,ll b,ll mod){
ll res=1;
if(!b) return 1;
while(b){
if(b&1) res=(res*a)%mod;
a=(a*a)%mod;
b>>=1;
}
return res;
}
ll qpow(ll a,ll b){
ll res=1;
if(!b) return 1;
while(b){
if(b&1) res*=a;
a*=a;
b>>=1;
}
return res;
}
#define db double
#define pf printf
#define pc putchar
#define fr(i,x,y) for(register ll i=(x);i<=(y);i++)
#define pfr(i,x,y) for(register ll i=(x);i>=(y);i--)
#define go(u) for(ll i=head[u];i;i=e[i].nxt)
#define enter pc('\n')
#define space pc(' ')
#define fir first
#define sec second
#define MP make_pair
#define il inline
#define inf 8e18
#define random(x) rand()*rand()%(x)
#define inv(a,mod) my_pow((a),(mod-2),(mod))
il ll read(){
ll sum=0,f=1;
char ch=0;
while(!isdigit(ch)){
if(ch=='-') f=-1;
ch=getchar();
}
while(isdigit(ch)){
sum=sum*10+(ch^48);
ch=getchar();
}
return sum*f;
}
il void write(ll x){
if(x<0){
x=-x;
pc('-');
}
if(x>9) write(x/10);
pc(x%10+'0');
}
il void writeln(ll x){
write(x);
enter;
}
il void writesp(ll x){
write(x);
space;
}
}
using namespace my_std;
set<ll> s;
ll n,a[600060],pre[600060];
queue<ll> q1,q3,q12,q32,q123,q321;
il ll find(ll x){
set<ll>::iterator it=s.upper_bound(x);
if(it==s.end()) return -1;
return *it;
}
int main(){
n=read();
fr(i,1,n) a[i]=read();
ll cnt1=0,cnt2=0,cnt3=0,cnt12=0,cnt32=0,cnt123=0,cnt321=0;
fr(i,1,n){
if(a[i]==3){
swap(cnt1,cnt3);
swap(cnt12,cnt32);
swap(cnt123,cnt321);
swap(q1,q3);
swap(q12,q32);
swap(q123,q321);
}
if(a[i]==1||a[i]==3){
if(cnt32){
cnt32--;
cnt321++;
pre[i]=q32.front();
q32.pop();
q321.push(i);
}
else if(cnt3&&cnt2&&cnt1&&find(q3.front())!=-1){
ll pos3=q3.front(),pos2=find(pos3);
cnt3--;
cnt2--;
cnt321++;
pre[i]=pos2;
pre[pos2]=pos3;
q3.pop();
s.erase(pos2);
q321.push(i);
if(!cnt3){
while(!q1.empty()&&!s.empty()){
ll tmp1=q1.front(),tmp2=find(tmp1);
if(tmp2==-1) break;
cnt1--;
cnt2--;
cnt12++;
pre[tmp2]=tmp1;
q1.pop();
s.erase(tmp2);
q12.push(tmp2);
}
}
}
else if(cnt2&&cnt123&&find(q123.front())!=-1){
ll pos123=q123.front(),pos2=find(pos123);
cnt123--;
cnt2--;
q123.pop();
s.erase(pos2);
cnt321++;
cnt12++;
q321.push(i);
q12.push(pre[pos123]);
pre[pos123]=0;
pre[pos2]=pos123;
pre[i]=pos2;
}
else if(cnt2&&cnt321&&find(q321.front())!=-1){
ll pos321=q321.front(),pos2=find(pos321);
cnt321--;
cnt2--;
q321.pop();
s.erase(pos2);
cnt321++;
cnt12++;
q321.push(i);
q12.push(pos2);
pre[i]=pre[pos321];
pre[pos321]=0;
pre[pos2]=pos321;
}
else{
cnt1++;
q1.push(i);
}
}
if(a[i]==2){
if(cnt1&&cnt3){
cnt2++;
s.insert(i);
}
else if(cnt1){
cnt12++;
cnt1--;
pre[i]=q1.front();
q12.push(i);
q1.pop();
}
else if(cnt3){
cnt32++;
cnt3--;
pre[i]=q3.front();
q32.push(i);
q3.pop();
}
else{
cnt2++;
s.insert(i);
}
}
if(a[i]==3){
swap(cnt1,cnt3);
swap(cnt12,cnt32);
swap(cnt123,cnt321);
swap(q1,q3);
swap(q12,q32);
swap(q123,q321);
}
}
writeln(cnt123+cnt321);
fr(i,1,n) if(pre[i]&&pre[pre[i]]) pf("%lld %lld %lld\n",pre[pre[i]]-1,pre[i]-1,i-1);
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 5756kb
input:
6 3 1 2 2 3 1
output:
2 1 2 4 0 3 5
result:
ok count=2
Test #2:
score: 0
Accepted
time: 1ms
memory: 5640kb
input:
6 2 1 3 1 3 2
output:
0
result:
ok count=0
Test #3:
score: 0
Accepted
time: 1ms
memory: 5868kb
input:
3000 1 1 1 1 1 3 1 1 3 3 1 3 1 1 2 3 1 1 2 1 2 1 3 3 3 1 1 2 1 2 2 3 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 3 3 1 1 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 3 1 1 1 1 3 3 2 1 3 1 1 2 3 1 2 3 1 1 1 2 1 1 1 1 2 3 2 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 3 1 3 3 1 1 1 1 3 1 1 2 1 1 1 3 3 1 1 1 1 2 1 1 1 1 1 2 3 3 1...
output:
499 0 14 15 5 18 19 8 20 21 9 27 28 1 29 31 11 30 32 22 39 40 2 46 47 23 51 52 24 54 55 48 60 61 3 67 72 4 71 77 78 79 80 6 84 85 7 87 88 81 92 93 10 97 98 12 99 117 13 105 119 16 113 120 125 128 129 132 138 139 17 144 145 133 148 149 146 162 163 151 167 169 164 168 170 171 176 177 180 181 182 184 1...
result:
ok count=499
Test #4:
score: 0
Accepted
time: 1ms
memory: 5748kb
input:
3000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 0 1374 2901
result:
ok count=1
Test #5:
score: 0
Accepted
time: 1ms
memory: 6244kb
input:
3000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 1755 1756 2819
result:
ok count=1
Test #6:
score: 0
Accepted
time: 1ms
memory: 5736kb
input:
1500 1 1 1 2 1 1 1 2 2 2 2 2 1 1 3 1 2 2 3 1 2 2 2 2 1 2 1 2 1 1 3 1 2 2 2 2 1 1 3 1 1 2 2 3 2 1 3 1 1 2 2 2 1 2 2 2 2 2 1 2 3 2 3 2 3 2 1 3 2 1 2 3 2 2 3 2 3 1 1 3 1 3 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 1 3 1 1 1 1 1 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 1 3 1...
output:
500 24 25 76 64 65 77 67 68 78 26 27 79 71 72 80 31 32 81 74 75 82 2 8 83 28 34 84 29 35 85 14 22 86 40 41 87 4 9 88 5 10 89 18 23 90 38 42 91 48 49 92 43 44 93 6 11 94 46 50 95 36 51 96 30 33 97 60 61 98 62 63 99 12 16 100 13 17 102 15 20 104 19 21 105 0 3 109 1 7 112 37 53 118 39 54 119 45 55 120 ...
result:
ok count=500
Test #7:
score: 0
Accepted
time: 1ms
memory: 5800kb
input:
3000 3 1 1 1 1 3 3 2 1 1 1 2 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 1 3 3 1 1 1 1 3 1 3 1 1 3 3 3 3 1 3 1 3 1 3 1 3 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 1 1 1 1 3 1 1 1 3 3 1 2 3 3 1 3 3 3 3 3 3 3 1 1 1 1 3 1 3 1 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 1 3 1 3 1 3 2 3 1 3 1 1 3 1 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2...
output:
1000 68 191 1775 894 1152 1776 895 1153 1777 574 660 1778 896 1154 1779 899 1155 1780 575 663 1781 901 1156 1782 579 665 1783 902 1157 1784 581 666 1785 905 1158 1786 583 667 1787 907 1159 1788 584 668 1789 587 669 1790 69 193 1791 70 194 1792 71 195 1793 73 197 1794 909 1160 1795 588 670 1796 910 1...
result:
ok count=1000
Test #8:
score: 0
Accepted
time: 0ms
memory: 6060kb
input:
3000 1 3 1 1 3 1 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 1 3 1 1 3 1 3 3 1 2 2 3 1 3 3 3 1 3 3 2 3 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 3 1 1 1 1 3 1 1 1 3 1 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 3 3 3 3 1 1 1...
output:
1000 793 878 1234 794 879 1236 795 880 1238 139 183 1239 145 204 1240 798 881 1241 801 882 1242 146 205 1243 147 207 1244 802 883 1245 803 884 1246 806 885 1247 148 208 1248 150 209 1249 808 886 1250 810 887 1251 813 888 1252 153 210 1253 814 889 1254 815 890 1255 154 214 1256 157 215 1257 158 216 1...
result:
ok count=1000
Test #9:
score: 0
Accepted
time: 1ms
memory: 6060kb
input:
2997 3 1 2 2 1 1 1 1 1 1 3 1 3 3 1 3 3 3 1 3 1 2 1 1 3 1 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 1 1 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 1 3 1 1 1 1 1 3 3 3 1 3 1 1 3 3 3 1 3 3 1 1 1 3 1 1 3 1 1 3 2 3 3 3 2 3 2 3 1 2 1 1 3 1 1 3 2 2 2 2...
output:
999 381 408 432 386 409 433 68 95 434 389 410 435 70 74 436 5 31 437 6 32 438 390 411 439 7 35 440 8 37 441 391 412 442 394 413 443 9 38 444 11 39 445 395 414 446 398 415 447 401 416 448 402 417 449 403 418 450 14 40 451 18 41 452 51 75 453 52 76 454 55 77 455 57 78 456 62 93 457 64 94 458 60 79 459...
result:
ok count=999
Test #10:
score: 0
Accepted
time: 1ms
memory: 5812kb
input:
2994 1 1 2 1 2 1 2 2 3 1 3 3 3 3 1 3 1 1 2 3 3 1 3 3 3 3 1 1 1 3 3 2 3 1 3 1 3 3 1 2 3 1 3 3 3 1 3 1 3 2 3 2 1 1 3 1 1 1 3 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 2 3 3 3 3 3 3 1 3 1 3 1 1 2 1 3 3 3 2 2 3 2 1 3 3 3 1 2 1 1 2 3 3 1 3 2 2 2 2 2 2 2 2...
output:
998 1260 1474 1852 1261 1475 1853 1265 1476 1855 1266 1477 1857 1268 1478 1858 1269 1479 1859 656 952 1860 1270 1480 1861 1271 1481 1862 660 953 1863 398 464 1864 399 465 1865 400 467 1866 401 468 1867 1272 1482 1868 402 470 1869 1273 1483 1870 1277 1484 1871 405 471 1872 406 477 1873 408 479 1874 4...
result:
ok count=998
Test #11:
score: 0
Accepted
time: 1ms
memory: 5792kb
input:
3000 1 1 1 3 2 3 2 3 1 1 1 1 2 3 1 2 1 2 1 3 3 2 2 3 3 2 3 2 2 3 3 3 3 3 1 3 2 1 2 3 2 3 3 3 2 1 3 3 3 2 1 1 1 1 2 1 3 1 3 2 2 2 1 2 3 3 3 2 1 3 1 3 2 3 1 3 2 3 3 1 2 1 2 2 3 1 3 2 2 1 1 2 3 1 1 3 1 3 2 2 3 2 2 1 3 2 2 2 3 3 2 3 1 2 2 1 1 1 2 3 2 1 3 2 1 1 1 3 3 1 3 1 3 2 2 1 1 1 1 2 1 2 3 1 2 1 2 2...
output:
1000 358 374 385 360 375 388 361 377 392 364 378 394 368 380 396 370 383 398 372 386 399 387 389 402 188 198 404 16 200 408 112 393 409 115 395 410 116 397 412 71 105 413 75 106 414 117 403 416 121 405 417 78 107 419 86 110 421 124 406 423 125 407 424 126 415 426 129 418 428 131 420 430 92 113 432 1...
result:
ok count=1000
Test #12:
score: 0
Accepted
time: 1ms
memory: 6084kb
input:
3000 2 2 1 3 2 2 2 3 2 2 2 2 2 1 2 2 2 2 2 1 3 2 2 2 2 3 2 2 2 2 2 2 1 3 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 1 2 3 2 3 1 2 2 3 2 3 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 3 2 2 1 2 3 2 1 3 3 2 3 2 2 2 3 1 2 2 2 2 1 2 3 3 1 2 1 1 2 2 2 1 2 2 2 2 2 2 1 2 3 1 2 1 2 2 3 2 2 2 2 2 2 2 2 2 3 1 2 2 2 2 3 2 3 3 1 2 2 1 2...
output:
673 284 285 999 787 792 1000 7 8 1001 20 22 1002 790 793 1003 294 296 1004 800 801 1005 295 297 1006 811 812 1007 299 300 1008 25 26 1009 45 47 1010 3 5 1011 814 815 1012 51 52 1013 826 827 1014 829 831 1015 830 832 1016 836 837 1017 840 841 1018 843 845 1019 851 852 1020 857 861 1021 53 56 1022 865...
result:
ok count=673
Test #13:
score: 0
Accepted
time: 1ms
memory: 5888kb
input:
2999 2 2 3 3 2 1 2 1 1 2 2 3 2 3 2 3 2 2 2 1 2 3 2 2 2 2 1 3 2 3 3 2 1 2 3 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 3 2 2 2 3 3 2 2 2 3 3 3 2 1 1 2 2 2 1 2 2 1 1 2 2 2 2 2 1 2 2 2 3 2 2 3 3 3 1 1 2 2 3 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 3 3 1 1 2 2 2 2 1 1 2 2 3 2 3 2 3 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 2 1...
output:
683 232 237 999 233 238 1000 239 240 1001 66 68 1002 241 244 1003 67 69 1004 123 125 1005 249 250 1006 252 255 1007 256 257 1008 138 139 1009 140 142 1010 266 270 1011 267 271 1012 147 149 1013 268 272 1014 148 150 1015 151 152 1016 275 279 1017 281 282 1018 71 72 1019 294 301 1020 298 302 1021 155 ...
result:
ok count=683
Test #14:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
2998 2 1 2 1 3 2 2 2 2 2 2 2 1 2 2 2 2 3 3 2 1 2 1 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 3 1 3 2 2 1 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 3 2 2 3 3 2 2 2 2 1 2 1 2 2 2 2 3 2 3 3 3 1 2 2 2 2 2 3 2 2 2 1 2 2 2 2 2 2 2 3 2 2 3 3 2 1 1 2 2 3 3 2 1 2 2 2 2 2 2 2 2 3 2 1 2 1 2 2 3 1 2 3 2 2 2 2...
output:
629 899 901 992 917 918 993 920 921 999 176 177 1000 925 926 1001 187 188 1002 191 194 1003 193 197 1004 927 929 1005 207 208 1006 211 212 1007 214 215 1008 223 224 1009 928 930 1010 225 226 1011 229 230 1012 938 939 1013 232 233 1014 237 238 1015 43 49 1016 941 942 1017 954 956 1018 243 244 1019 95...
result:
ok count=629
Test #15:
score: 0
Accepted
time: 1ms
memory: 6044kb
input:
2997 1 1 3 2 3 3 2 2 1 2 2 2 2 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 3 2 3 2 3 2 3 3 2 2 2 2 2 2 2 1 1 2 2 3 3 2 1 2 2 3 3 2 2 1 1 1 2 1 2 1 2 2 1 2 1 3 1 3 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 1 2 2 3 2 1 2 2 2 3 2 2 1 3 1 2 2 2 1 3 2 2 1 2 3 2 3 1 3 2 2 3 2 2 2 2 1 2 2 2 1 1 2 3 2 2 2 3 2 3 1 2 2 3 2 2 2...
output:
712 200 203 999 201 204 1000 28 30 1001 240 243 1002 221 222 1003 242 244 1004 228 229 1005 232 233 1006 247 248 1007 251 252 1008 237 238 1009 257 262 1010 239 241 1011 260 267 1012 276 295 1013 280 296 1014 8 10 1015 292 297 1016 253 254 1017 294 298 1018 256 259 1019 299 300 1020 303 304 1021 308...
result:
ok count=712
Test #16:
score: 0
Accepted
time: 1ms
memory: 6048kb
input:
3000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1000 0 1000 2000 1 1001 2001 2 1002 2002 3 1003 2003 4 1004 2004 5 1005 2005 6 1006 2006 7 1007 2007 8 1008 2008 9 1009 2009 10 1010 2010 11 1011 2011 12 1012 2012 13 1013 2013 14 1014 2014 15 1015 2015 16 1016 2016 17 1017 2017 18 1018 2018 19 1019 2019 20 1020 2020 21 1021 2021 22 1022 2022 23 102...
result:
ok count=1000
Test #17:
score: 0
Accepted
time: 1ms
memory: 6168kb
input:
3000 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 0 2 2999
result:
ok count=1
Test #18:
score: 0
Accepted
time: 1ms
memory: 6028kb
input:
15 2 3 3 2 1 3 2 1 1 1 3 2 3 1 2
output:
3 1 3 4 2 6 7 8 11 12
result:
ok count=3
Test #19:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
18 3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1
output:
6 0 6 8 1 7 10 3 9 12 2 11 15 4 13 16 5 14 17
result:
ok count=6
Test #20:
score: 0
Accepted
time: 0ms
memory: 6020kb
input:
16 1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2
output:
5 1 3 4 0 7 10 2 8 11 6 9 12 5 13 14
result:
ok count=5
Test #21:
score: 0
Accepted
time: 1ms
memory: 5988kb
input:
15 1 3 1 2 3 2 3 3 2 1 2 2 1 1 3
output:
5 2 5 6 1 8 9 7 10 12 4 11 13 0 3 14
result:
ok count=5
Test #22:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
18 1 3 1 3 2 1 1 3 2 2 2 3 2 3 2 1 1 3
output:
6 1 4 5 0 8 11 2 9 13 3 10 15 7 12 16 6 14 17
result:
ok count=6
Test #23:
score: 0
Accepted
time: 1ms
memory: 5716kb
input:
18 1 3 3 2 1 1 1 2 3 2 1 1 2 3 2 3 2 3
output:
6 1 3 4 0 7 8 2 9 10 5 12 13 6 14 15 11 16 17
result:
ok count=6
Test #24:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
18 1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1
output:
6 2 3 10 4 5 11 6 8 12 0 1 13 7 9 15 14 16 17
result:
ok count=6
Test #25:
score: 0
Accepted
time: 0ms
memory: 5760kb
input:
15 1 2 1 2 3 3 1 1 1 2 3 2 3 2 3
output:
5 0 1 4 2 3 5 6 9 10 7 11 12 8 13 14
result:
ok count=5
Test #26:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
18 3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3
output:
6 0 1 4 2 3 5 6 10 11 7 12 13 9 14 15 8 16 17
result:
ok count=6
Test #27:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
15 1 2 3 2 3 3 3 1 3 2 1 2 1 2 1
output:
5 0 1 4 2 3 7 5 9 10 6 11 12 8 13 14
result:
ok count=5
Test #28:
score: 0
Accepted
time: 0ms
memory: 5832kb
input:
18 2 1 2 2 2 2 1 3 1 3 3 3 2 2 2 2 3 2
output:
2 1 2 7 6 12 16
result:
ok count=2
Test #29:
score: 0
Accepted
time: 1ms
memory: 5840kb
input:
17 1 2 2 2 2 1 1 1 1 3 2 2 1 2 1 2 2
output:
1 0 1 9
result:
ok count=1
Test #30:
score: 0
Accepted
time: 1ms
memory: 5836kb
input:
16 1 2 2 2 2 3 3 1 3 3 2 2 2 2 3 2
output:
2 0 1 5 7 10 14
result:
ok count=2
Test #31:
score: 0
Accepted
time: 1ms
memory: 5756kb
input:
18 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3
output:
5 0 5 12 1 6 13 2 7 14 3 8 15 4 9 16
result:
ok count=5
Test #32:
score: 0
Accepted
time: 0ms
memory: 6020kb
input:
6 1 2 3 2 3 1
output:
2 0 1 4 2 3 5
result:
ok count=2
Test #33:
score: 0
Accepted
time: 1ms
memory: 5552kb
input:
6 2 1 3 3 1 2
output:
0
result:
ok count=0
Test #34:
score: 0
Accepted
time: 0ms
memory: 5844kb
input:
6 3 1 2 2 3 1
output:
2 1 2 4 0 3 5
result:
ok count=2
Test #35:
score: 0
Accepted
time: 2ms
memory: 6260kb
input:
15000 2 1 3 1 1 2 3 1 3 1 1 1 3 2 2 2 1 3 2 3 3 3 3 2 1 1 2 2 1 1 1 1 1 1 3 3 3 3 3 1 3 1 2 1 1 1 1 1 2 1 2 1 2 1 3 3 3 3 3 2 2 1 1 2 3 3 3 2 3 2 1 2 1 1 1 1 1 3 2 3 2 1 1 2 1 1 1 1 3 2 1 2 1 1 2 1 2 1 2 1 3 3 2 3 2 3 1 2 1 3 3 1 2 2 3 1 2 3 2 3 3 1 1 1 3 3 2 2 2 2 2 1 3 3 3 2 2 1 2 1 3 3 3 3 2 2 1 ...
output:
4997 1479 1947 2051 1486 1948 2056 1490 1949 2057 1494 1950 2061 1496 1952 2065 1498 1953 2071 1499 1954 2072 1501 1956 2076 1515 1957 2077 1516 1958 2080 1518 1964 2081 1519 1969 2083 1520 1971 2085 1525 1973 2086 1528 1974 2087 1529 1975 2090 1532 1976 2091 1534 1977 2093 1535 1978 2095 1538 1979 ...
result:
ok count=4997
Test #36:
score: 0
Accepted
time: 2ms
memory: 6176kb
input:
15000 3 1 3 3 2 1 1 3 1 2 2 3 1 2 1 2 1 2 1 1 2 2 1 2 3 2 3 2 3 3 1 1 2 1 2 2 3 3 3 2 3 2 1 1 3 2 2 3 1 2 1 3 1 3 1 3 2 1 1 1 3 3 2 2 3 3 1 2 3 2 3 2 2 2 1 2 3 2 2 1 1 3 3 2 1 3 3 3 2 2 1 1 3 1 3 2 2 3 3 1 2 2 2 3 1 1 2 1 1 1 1 1 2 2 1 2 1 3 3 3 3 3 2 3 1 1 1 1 1 1 2 1 1 2 3 2 1 3 3 3 2 1 1 3 2 1 1 ...
output:
4999 2081 2130 2134 2091 2139 2140 2100 2142 2144 2105 2146 2148 2115 2147 2149 2118 2151 2155 2119 2152 2157 86 2163 2167 11 27 2177 87 2166 2178 92 2169 2181 94 2170 2184 97 2172 2186 98 2173 2187 103 2174 2188 117 2180 2194 118 2182 2199 119 2183 2201 120 2191 2204 121 2192 2205 123 2195 2208 24 ...
result:
ok count=4999
Test #37:
score: 0
Accepted
time: 2ms
memory: 6184kb
input:
15000 1 2 1 3 2 3 2 3 2 3 3 1 3 3 1 1 3 1 2 3 1 1 3 2 1 2 1 2 1 1 2 1 1 1 3 3 1 2 3 3 3 1 3 3 2 1 3 3 3 3 1 3 2 3 3 1 3 2 3 1 3 3 1 2 2 2 1 3 3 2 3 2 3 3 2 3 2 1 1 3 2 3 3 1 1 1 3 1 3 1 2 1 3 2 2 1 2 1 2 3 3 1 1 2 1 1 3 3 3 3 1 1 2 2 3 1 2 1 3 1 1 3 2 3 1 2 1 3 1 1 3 3 3 1 3 3 3 1 2 2 2 1 2 1 3 2 3 ...
output:
4998 88 194 196 92 199 201 106 200 203 107 214 215 108 220 221 109 228 229 118 241 242 121 250 254 127 252 257 130 263 264 131 266 268 132 267 269 134 276 279 135 287 291 136 289 292 148 293 302 153 294 304 155 296 307 168 300 312 175 301 313 179 303 316 180 309 319 183 314 321 184 315 322 186 318 3...
result:
ok count=4998
Test #38:
score: 0
Accepted
time: 2ms
memory: 5920kb
input:
15000 1 2 1 1 1 2 3 1 2 3 3 3 2 2 1 2 1 3 3 2 3 2 1 1 2 3 3 1 1 2 1 3 2 3 1 1 2 2 2 1 3 1 2 3 3 2 2 1 2 3 3 2 2 2 2 3 3 3 2 3 3 2 1 2 3 3 1 3 3 1 1 3 3 3 2 3 2 1 3 1 1 2 1 3 1 2 1 1 2 1 2 3 2 2 3 3 2 2 1 3 3 2 3 1 2 2 3 3 2 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 1 3 1 3 2 2 2 2 3 2 1 2 2 3 3 1 2 3 1 1 3 1 2 ...
output:
5000 127 133 157 132 135 158 11 12 159 138 140 160 141 146 162 144 147 163 17 54 164 152 153 167 154 156 168 155 161 170 165 171 172 166 175 176 169 179 180 173 186 187 178 188 189 183 192 193 184 215 218 198 217 220 209 224 225 232 233 234 236 239 242 237 240 243 244 263 265 245 269 274 246 270 275...
result:
ok count=5000
Test #39:
score: 0
Accepted
time: 2ms
memory: 8252kb
input:
15000 3 3 1 1 1 1 3 3 3 3 3 1 3 1 3 1 1 3 1 3 3 3 3 1 2 3 3 3 3 3 3 3 3 3 3 1 3 1 1 3 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 3 1 1 3 2 1 1 1 1 3 3 1 3 3 1 3 1 3 1 1 3 1 3 3 1 1 1 1 1 3 1 1 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 2 1 3 2 3 1 1 ...
output:
5000 405 465 606 93 199 607 406 466 608 94 200 609 96 201 610 97 202 611 410 467 612 99 203 613 413 468 614 131 154 615 132 155 616 133 156 617 134 157 618 416 469 619 420 470 620 135 158 621 137 159 622 421 471 623 138 160 624 139 161 625 142 162 626 422 472 627 423 473 628 424 474 629 144 163 630 ...
result:
ok count=5000
Test #40:
score: 0
Accepted
time: 2ms
memory: 6184kb
input:
15000 3 1 3 1 3 3 1 1 1 1 3 3 3 3 3 3 1 1 3 1 1 3 3 3 3 3 3 3 3 3 2 3 1 3 3 3 3 3 3 1 3 1 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 1 1 1 3 1 1 3 1 1 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 1 1 1 3 1 1 1 3 3 3 3 1 1 1 1 3 1 3 1 1 3 1 2 1 2 1 3 1 3 1 1 1 1 3 3 3 3 ...
output:
5000 125 259 2326 127 260 2328 1490 1825 2330 1492 1826 2331 1493 1827 2332 29 74 2333 130 262 2334 1494 1828 2335 136 263 2336 33 75 2337 1496 1829 2338 34 76 2339 1497 1830 2340 35 77 2341 405 559 2342 1500 1831 2343 1501 1832 2344 1503 1833 2345 138 267 2346 36 78 2347 37 79 2348 38 80 2349 1509 ...
result:
ok count=5000
Test #41:
score: 0
Accepted
time: 2ms
memory: 5984kb
input:
15000 3 3 1 1 1 1 3 3 3 1 3 1 3 1 3 1 3 3 3 3 1 3 3 1 1 1 3 1 1 1 1 3 1 1 3 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 3 3 3 3 3 3 3 1 3 3 3 1 3 1 3 3 3 3 3 3 3 3 3 1 1 1 1 3 3 1 3 3 3 1 3 3 1 3 3 1 3 3 3 3 1 1 1 1 3 3 1 3 1 3 3 1 3 1 1 3 1 3 1 3 3 3 1 1 1 1 3 3 3 3 1 3 1 3 1 1 3 1 1 1 3 1 1 1 3 2 3 3 3 3 1 1 1 ...
output:
5000 245 699 3915 1389 1615 3916 1392 1616 3917 1393 1617 3918 247 700 3919 1394 1618 3920 248 701 3921 251 702 3922 253 703 3923 256 704 3924 257 707 3925 1395 1619 3926 1398 1620 3927 1399 1621 3928 1401 1622 3929 1403 1623 3930 258 708 3931 259 709 3932 1405 1624 3933 1410 1625 3934 1415 1626 393...
result:
ok count=5000
Test #42:
score: 0
Accepted
time: 1ms
memory: 5836kb
input:
6000 1 3 1 1 3 3 3 1 1 1 1 1 3 1 1 1 3 1 3 3 3 1 3 1 1 1 3 3 3 3 1 1 3 1 3 1 3 3 3 3 3 3 3 3 3 3 1 3 1 3 1 1 1 1 3 3 3 1 1 1 1 3 1 3 1 3 1 3 1 1 1 1 3 3 1 3 3 3 1 3 3 3 1 3 3 3 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
2000 361 413 1098 639 849 1099 36 127 1100 640 850 1101 414 481 1102 37 132 1103 644 851 1104 645 852 1105 647 853 1106 416 482 1107 420 483 1108 651 854 1109 421 484 1110 38 134 1111 652 855 1112 39 135 1113 654 856 1114 655 857 1115 656 858 1116 657 859 1117 659 860 1118 660 861 1119 662 862 1120 ...
result:
ok count=2000
Test #43:
score: 0
Accepted
time: 1ms
memory: 5944kb
input:
9000 1 1 1 1 1 1 1 1 1 3 1 1 1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 3 2 1 3 3 1 3 3 2 3 2 3 2 2 2 2 2 2 2 2 2 3 3 3 3 1 3 3 1 3 1 3 1 1 3 2 3 3 1 3 1 1 1 1 3 3 1 1 1 3 3 1 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 1 1 3 3 3 1 1 1 3 1 3 3 1 1 3 3 3 1 3 1 1 3 3 1 1 1 1 3 1 3 1 1...
output:
3000 1400 1667 2414 176 277 2415 1401 1668 2416 178 278 2417 1402 1669 2418 181 279 2419 309 310 2420 312 365 2421 53 88 2422 1403 1670 2423 54 89 2424 55 90 2425 313 409 2426 57 91 2427 1405 1671 2428 1406 1672 2429 1407 1673 2430 1410 1674 2431 58 92 2432 60 93 2433 315 423 2434 1415 1675 2435 141...
result:
ok count=3000
Test #44:
score: 0
Accepted
time: 0ms
memory: 5984kb
input:
12000 3 3 3 3 3 1 3 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 1 1 1 1 3 3 3 2 1 1 1 3 3 3 3 1 3 1 3 1 1 1 1 1 3 3 1 1 3 3 1 1 1 2 1 3 3 1 1 1 1 1 1 1 3 1 3 3 1 3 1 3 3 1 1 1 3 3 3 1 1 1 3 3 1 3 3 1 3 3 3 1 1 3 1 1 1 3 1 1 3 3 1 1 1 1 1 3 3 1 3 1 3 3 1 1 3 1 3 1 3 3 3 3 3 3 1 1 1 1 1 3 1 1 1 3 1 3 1 3 3 3 3 1 ...
output:
4000 2883 3157 5080 2891 3158 5081 2892 3159 5082 2895 3160 5084 2896 3161 5085 237 580 5088 238 581 5089 2899 3162 5090 2901 3163 5091 240 584 5092 243 585 5093 244 586 5094 245 587 5095 247 591 5096 2902 3164 5097 248 593 5098 249 594 5099 2904 3165 5100 250 595 5101 251 598 5102 2905 3166 5103 29...
result:
ok count=4000
Test #45:
score: 0
Accepted
time: 2ms
memory: 5972kb
input:
15000 3 3 1 3 3 2 3 2 1 1 2 1 3 1 1 3 1 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1 2 3 2 2 1 1 1 1 1 1 1 3 3 3 1 1 3 1 3 1 1 3 3 3 1 3 1 3 1 1 1 3 3 1 3 1 3 1 2 1 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 3 3 1 3 3 1 1 1 1 1 1 3 1 1 1 1 3 3 3 3 2 3 3 3 1 3 1 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
5000 9 20 859 225 275 860 611 646 861 612 647 862 228 276 863 232 277 864 614 648 865 233 278 866 615 649 867 616 650 868 617 651 869 234 279 870 8 27 871 235 280 872 11 28 873 619 652 874 21 29 875 622 653 876 624 654 877 626 655 878 627 656 879 628 657 880 629 658 881 633 659 882 686 763 883 687 7...
result:
ok count=5000
Test #46:
score: 0
Accepted
time: 2ms
memory: 7988kb
input:
15000 3 3 3 3 1 1 1 3 1 1 1 3 1 1 1 3 1 3 3 3 3 3 1 1 3 1 1 3 3 3 1 1 1 3 1 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 3 2 3 1 1 3 3 3 3 3 1 1 1 3 3 2 3 1 1 3 3 3 3 1 3 3 3 1 1 1 1 3 3 3 1 3 3 1 1 2 3 1 1 1 3 3 1 1 3 3 3 3 1 3 3 1 1 3 1 3 3 1 1 1 3 3 1 1 1 3 1 2 1 1 2 1 1 1 2 3 3 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
5000 513 980 3899 2879 2944 3900 2880 2945 3901 514 982 3902 515 983 3903 518 984 3904 520 985 3905 2881 2946 3906 2882 2947 3907 521 986 3908 524 989 3909 529 990 3910 532 991 3911 2884 2948 3912 2890 2949 3913 533 993 3914 534 994 3915 536 995 3916 538 996 3917 2891 2950 3918 541 999 3919 542 1000...
result:
ok count=5000
Test #47:
score: 0
Accepted
time: 2ms
memory: 6204kb
input:
15000 3 3 1 3 3 1 1 2 1 1 3 1 1 3 1 3 1 1 1 3 3 1 3 3 1 3 1 1 1 1 3 3 3 2 2 1 2 3 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 3 1 3 3 3 3 1 1 3 3 3 1 3 3 1 1 1 1 1 1 3 1 1 1 3 3 1 1 3 1 3 1 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 3 3 1 1 3 1 3 3 3 3 3 3 3 1 3 1 3 1 1 1 3 3 3 1 ...
output:
5000 1585 1809 2308 1586 1810 2309 1587 1811 2310 1588 1812 2311 109 456 2312 110 459 2313 111 463 2314 1589 1813 2315 1594 1814 2316 117 465 2317 121 468 2318 122 471 2319 125 473 2320 126 475 2321 128 476 2322 136 477 2323 1595 1815 2324 138 480 2325 1597 1816 2326 140 481 2327 141 482 2328 1598 1...
result:
ok count=5000
Test #48:
score: 0
Accepted
time: 2ms
memory: 6400kb
input:
15000 1 2 2 1 2 2 3 2 2 2 2 1 2 1 3 2 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 3 2 2 2 2 3 2 2 2 2 1 1 2 2 2 1 1 3 2 2 2 2 3 2 2 1 2 2 2 1 3 2 1 2 2 2 2 2 2 3 2 2 3 2 2 3 2 1 2 2 2 2 2 3 2 2 2 2 2 3 3 1 2 1 2 2 2 2 3 2 1 1 2 2 2 2 2 1 2 2 2 2 2 3 2 2 1 2 3 3 2 2 2 1 2 2 2 2 3 2 2 2 2 2 3 3 3 2 1 2 1 2 1 2 3 ...
output:
3267 2074 2075 4998 2421 2425 5000 2079 2080 5001 2424 2426 5002 2083 2084 5003 2428 2432 5004 2086 2087 5005 2429 2433 5006 2440 2441 5007 2460 2461 5008 2464 2465 5009 2088 2090 5010 2468 2469 5011 2474 2475 5012 2499 2501 5013 2094 2095 5014 2541 2542 5015 2111 2112 5016 2128 2129 5017 2130 2131 ...
result:
ok count=3267
Test #49:
score: 0
Accepted
time: 2ms
memory: 6068kb
input:
15000 1 2 2 2 1 2 2 2 2 2 1 2 2 2 1 3 2 1 1 2 2 1 2 2 2 2 2 2 2 2 2 1 3 2 1 1 2 3 3 1 2 1 1 1 3 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 2 3 1 2 2 1 1 3 2 2 3 2 2 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 3 1 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 3 2 3 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 1 2 2 2 2 3 2 1 2 2 1 2 2 ...
output:
3340 4874 4875 5000 4881 4882 5001 202 204 5002 211 217 5003 207 213 5004 216 218 5005 4898 4899 5006 38 51 5007 44 52 5008 235 236 5009 4912 4913 5010 4916 4918 5011 4920 4921 5012 56 57 5013 238 239 5014 241 242 5015 4925 4927 5016 4926 4928 5017 4936 4937 5018 4941 4942 5019 4944 4946 5020 4954 4...
result:
ok count=3340
Test #50:
score: 0
Accepted
time: 2ms
memory: 6056kb
input:
14000 1 2 1 2 1 2 2 3 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 2 2 3 2 2 2 3 1 3 1 1 2 2 2 2 1 3 2 2 1 2 2 2 1 2 3 2 2 1 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 3 3 1 1 2 2 2 1 2 2 3 1 2 2 2 2 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 3 2 2 2 1 1 3 2 2 2 1 2 2 2 2 2 1 2 1 ...
output:
3042 216 217 4663 4662 4664 4665 24 27 4666 133 137 4667 165 170 4668 218 219 4669 168 176 4670 220 221 4671 169 177 4672 171 180 4673 232 233 4674 182 184 4675 237 238 4676 173 181 4677 244 245 4678 186 187 4679 247 249 4680 254 256 4681 255 257 4682 0 1 4683 39 47 4684 258 262 4685 259 263 4686 26...
result:
ok count=3042
Test #51:
score: 0
Accepted
time: 2ms
memory: 6048kb
input:
13000 2 2 3 3 2 2 2 1 2 3 2 1 2 1 2 3 1 3 3 1 2 1 2 1 2 3 2 2 2 2 2 2 1 2 2 1 3 3 3 1 2 2 3 2 3 2 1 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 2 3 3 2 2 2 2 1 2 3 2 2 3 2 2 1 2 1 2 2 2 1 2 2 1 1 2 3 1 2 2 1 2 1 2 2 2 2 1 3 2 2 2 2 2 2 2 1 1 2 3 2 2 2 2 2 2 2 1 2 1 2 2 3 1 2 2 3 1 2 2 2 1 2 3 3 2 2 1 1 1 2 3 1 2 ...
output:
2941 4217 4218 4333 95 97 4334 100 103 4335 109 111 4336 210 212 4337 219 221 4338 4220 4221 4339 4223 4224 4340 4225 4226 4341 220 222 4342 4238 4239 4343 4242 4244 4344 4243 4245 4345 4255 4258 4346 4256 4260 4347 258 259 4348 224 226 4349 242 243 4350 4257 4261 4351 244 245 4352 4259 4264 4353 12...
result:
ok count=2941
Test #52:
score: 0
Accepted
time: 0ms
memory: 6232kb
input:
11000 2 2 2 3 2 2 2 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 3 2 2 2 2 1 2 1 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 3 2 1 1 2 2 2 2 1 2 2 3 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 3 2 2 3 2 1 3 2 2 2 2 1 2 2 3 2 2 3 2 2 2 2 2 2 2 3 2 1 2 2 3 1 2 2 3 2 2 3 2 3 2 2 2 ...
output:
2460 318 319 3664 324 325 3665 326 327 3666 331 336 3667 339 342 3668 341 344 3669 3347 3350 3670 3348 3353 3671 343 349 3672 359 363 3673 361 364 3674 365 367 3675 366 368 3676 3349 3354 3677 369 373 3678 3364 3366 3679 371 381 3680 205 207 3681 3365 3367 3682 262 263 3683 206 211 3684 3368 3370 36...
result:
ok count=2460
Test #53:
score: 0
Accepted
time: 2ms
memory: 6052kb
input:
11000 2 2 3 1 2 1 2 2 2 3 2 2 2 2 2 3 2 1 2 2 1 2 3 2 1 2 3 2 2 1 2 2 2 2 2 2 3 3 2 2 2 2 2 1 2 1 2 2 1 1 2 1 1 2 2 3 2 2 2 2 2 2 2 1 2 2 3 1 1 2 2 1 3 2 1 2 3 2 3 1 2 2 2 1 2 2 2 2 3 2 2 2 3 1 2 1 2 2 2 2 3 2 1 2 2 1 3 2 3 3 2 2 2 1 2 2 2 2 2 3 1 2 2 1 2 2 3 2 2 3 2 2 2 2 1 3 2 2 2 2 2 1 2 2 3 2 2 ...
output:
2423 667 669 3666 673 674 3667 3065 3066 3668 3067 3068 3669 676 677 3670 3072 3073 3671 698 700 3672 3074 3075 3673 3082 3083 3674 3084 3085 3675 701 702 3676 703 705 3677 3087 3088 3678 3097 3098 3679 706 715 3680 707 717 3681 708 719 3682 709 720 3683 712 721 3684 3104 3106 3685 716 722 3686 718 ...
result:
ok count=2423
Test #54:
score: 0
Accepted
time: 2ms
memory: 5972kb
input:
11000 2 1 1 3 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 3 2 2 2 3 2 1 2 1 2 1 2 2 2 2 3 2 2 2 2 2 2 3 2 1 2 3 1 3 2 2 3 2 2 3 2 1 3 1 3 2 2 2 2 2 2 1 3 2 2 2 2 1 2 2 2 2 3 2 2 3 3 1 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 2 2 2 3 2 2 1 1 2 3 3 2 3 1 1 3 1 2 2 2 3 2 1 2 2 2 3 3 3 2 1 2 2 2 3 2 2 ...
output:
2372 3576 3577 3656 3587 3588 3660 3600 3601 3666 79 81 3667 89 90 3668 3603 3608 3669 92 96 3670 125 139 3671 3606 3609 3672 93 97 3673 130 142 3674 108 109 3675 3617 3618 3676 160 161 3677 150 152 3678 162 163 3679 3623 3624 3680 113 114 3681 120 134 3682 3628 3629 3683 122 135 3684 3641 3642 3685...
result:
ok count=2372
Test #55:
score: 0
Accepted
time: 2ms
memory: 5972kb
input:
11000 2 2 1 2 3 2 2 1 2 2 2 3 1 2 2 2 2 2 2 2 3 2 2 1 2 2 2 2 2 3 2 2 1 1 2 3 2 3 2 2 2 2 2 2 2 2 1 3 2 3 3 2 2 2 3 2 2 2 1 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 3 2 2 2 2 2 1 2 2 2 2 2 2 2 1 3 1 1 2 3 3 2 2 2 2 2 1 2 2 2 2 1 2 2 1 2 3 2 2 2 2 2 1 1 3 2 2 1 2 3 2 2 2 1 1 2 2 2 ...
output:
2490 3507 3509 3665 233 236 3666 3508 3510 3667 247 252 3668 32 34 3669 248 253 3670 33 38 3671 46 48 3672 132 137 3673 3511 3512 3674 3513 3516 3675 58 59 3676 61 64 3677 3517 3520 3678 3519 3521 3679 74 76 3680 3527 3528 3681 131 135 3682 3540 3541 3683 75 77 3684 87 88 3685 3542 3544 3686 3554 35...
result:
ok count=2490
Test #56:
score: 0
Accepted
time: 1ms
memory: 5972kb
input:
15000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 7734 8258 8259
result:
ok count=1
Test #57:
score: 0
Accepted
time: 2ms
memory: 6484kb
input:
15000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1 5343 5344 8595
result:
ok count=1
Test #58:
score: 0
Accepted
time: 1ms
memory: 5936kb
input:
15000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
5000 0 5000 10000 1 5001 10001 2 5002 10002 3 5003 10003 4 5004 10004 5 5005 10005 6 5006 10006 7 5007 10007 8 5008 10008 9 5009 10009 10 5010 10010 11 5011 10011 12 5012 10012 13 5013 10013 14 5014 10014 15 5015 10015 16 5016 10016 17 5017 10017 18 5018 10018 19 5019 10019 20 5020 10020 21 5021 100...
result:
ok count=5000
Test #59:
score: 0
Accepted
time: 2ms
memory: 6420kb
input:
15000 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1 0 1 14998
result:
ok count=1
Test #60:
score: 0
Accepted
time: 1ms
memory: 5884kb
input:
15000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
3000 0 6000 9000 1 6001 9001 2 6002 9002 3 6003 9003 4 6004 9004 5 6005 9005 6 6006 9006 7 6007 9007 8 6008 9008 9 6009 9009 10 6010 9010 11 6011 9011 12 6012 9012 13 6013 9013 14 6014 9014 15 6015 9015 16 6016 9016 17 6017 9017 18 6018 9018 19 6019 9019 20 6020 9020 21 6021 9021 22 6022 9022 23 602...
result:
ok count=3000
Test #61:
score: 0
Accepted
time: 1ms
memory: 5888kb
input:
14997 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 0 4977 9976 1 4978 9977 2 4979 9978 3 4980 9979 4 4981 9980 5 4982 9981 6 4983 9982 7 4984 9983 8 4985 9984 9 4986 9985 10 4987 9986 11 4988 9987 12 4989 9988 13 4990 9989 14 4991 9990 15 4992 9991 16 4993 9992 17 4994 9993 18 4995 9994 19 4996 9995 20 4997 9996 21 4998 9997 22 4999 9998 23 500...
result:
ok count=4977
Test #62:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
91 2 1 2 2 1 3 1 2 1 2 2 1 2 3 3 1 2 2 2 1 3 1 3 1 1 3 1 2 1 2 1 3 1 1 3 2 3 1 2 3 2 2 2 2 1 2 1 1 3 2 2 2 1 1 2 3 3 2 3 3 3 3 1 1 3 2 3 3 1 3 3 3 3 3 2 1 2 2 2 3 2 3 2 1 3 1 3 1 3 1 1
output:
29 11 12 22 15 16 25 1 2 31 4 7 34 23 27 36 24 29 39 26 35 48 28 38 55 30 40 56 32 41 58 33 42 59 37 43 60 44 45 61 20 57 62 46 49 64 47 50 66 6 9 67 53 54 69 8 10 70 63 65 71 72 74 75 68 76 79 19 78 81 73 77 83 21 80 84 5 17 85 52 82 86 13 18 87 14 51 89
result:
ok count=29
Test #63:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
92 3 1 3 3 3 3 3 1 3 2 1 3 3 3 1 1 1 2 2 1 2 1 2 2 2 3 2 1 3 3 2 3 3 2 3 3 2 3 3 2 2 1 2 2 3 3 2 2 2 3 2 1 3 2 1 2 1 1 1 1 1 3 1 3 1 2 1 1 2 2 2 2 3 1 1 3 2 1 1 1 1 1 1 3 1 2 2 3 3 2 2 2
output:
29 2 17 19 3 18 21 1 20 25 4 22 27 7 23 28 14 24 29 15 26 31 16 30 32 5 33 41 6 36 51 8 39 54 11 40 56 12 42 57 13 43 58 34 46 59 35 47 60 37 48 62 38 50 64 44 53 66 45 55 67 10 71 72 49 65 73 52 68 74 61 69 77 63 70 78 0 9 79 75 76 80 81 85 87 82 86 88
result:
ok count=29
Test #64:
score: 0
Accepted
time: 1ms
memory: 6020kb
input:
93 1 1 3 1 1 3 1 1 2 3 1 1 1 2 3 3 2 1 1 3 1 3 3 2 3 3 1 3 2 2 3 3 1 3 1 1 1 2 2 3 1 2 3 1 3 3 2 3 2 3 2 3 2 3 2 3 3 2 1 3 2 2 1 1 1 2 1 1 2 2 2 1 1 2 3 1 2 2 3 3 2 1 2 2 1 2 2 2 2 3 3 2 2
output:
28 0 8 9 1 13 14 2 16 17 3 23 24 4 28 30 6 29 31 7 37 39 5 38 40 10 41 42 11 46 47 12 48 49 18 50 51 20 52 53 26 54 55 15 57 58 19 60 62 21 61 63 22 65 66 25 68 71 27 69 72 32 70 74 33 73 75 34 76 78 35 77 79 44 80 81 45 82 84 36 83 89 43 85 90
result:
ok count=28
Test #65:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
94 3 3 1 1 3 2 1 3 2 1 2 1 1 2 2 2 2 3 2 2 1 1 3 1 2 1 2 3 3 3 2 2 1 3 2 1 2 2 1 2 3 1 2 1 2 1 3 1 3 1 3 3 2 2 2 1 1 3 2 2 3 3 3 2 2 3 3 3 2 3 2 1 2 2 1 1 2 1 1 1 3 2 2 1 3 3 1 3 1 3 3 3 2 1
output:
30 28 31 35 29 34 38 33 36 41 40 42 43 1 8 45 4 10 47 7 14 49 46 52 55 48 53 56 6 19 65 21 44 66 23 54 67 25 58 69 17 18 71 0 5 74 22 24 75 50 59 77 51 63 78 57 64 79 3 15 80 60 68 83 12 16 84 9 26 85 61 70 86 11 37 87 62 72 88 20 39 89 2 13 90 32 73 91 27 30 93
result:
ok count=30
Test #66:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
94 3 2 3 2 1 2 1 3 3 2 1 3 2 3 1 3 2 1 2 2 2 3 3 1 3 3 1 2 1 1 1 2 3 2 1 2 2 2 2 2 3 1 3 3 2 3 3 3 1 1 1 2 1 1 1 3 3 3 1 1 3 1 3 1 2 3 3 2 1 1 2 3 2 1 2 2 3 1 3 3 1 1 1 3 2 3 1 2 2 2 2 3 1 1
output:
29 4 5 7 6 19 21 10 20 22 25 31 34 14 35 40 32 33 41 17 36 42 23 37 43 26 38 45 28 39 46 29 44 47 8 9 48 11 12 49 13 16 50 15 18 52 2 3 53 0 1 54 30 51 55 24 27 58 59 64 65 56 67 68 61 70 71 57 72 73 63 74 76 60 75 77 69 84 85 80 87 91 62 88 92 66 89 93
result:
ok count=29
Test #67:
score: 0
Accepted
time: 0ms
memory: 6024kb
input:
96 2 3 2 1 1 1 1 3 3 2 2 1 2 1 3 3 3 2 3 2 1 3 2 1 2 3 2 2 3 2 1 2 2 1 1 3 1 2 3 3 3 3 3 1 1 2 1 1 2 2 2 1 3 3 1 1 3 2 3 1 1 3 2 1 1 1 2 1 3 2 2 3 3 2 2 3 3 1 1 1 3 1 3 3 3 3 1 3 3 2 2 2 1 1 1 2
output:
28 16 22 23 6 24 25 3 27 28 21 26 30 1 2 33 14 29 34 4 12 35 18 31 36 5 17 38 11 32 39 13 37 40 7 9 43 8 10 44 41 45 46 42 48 51 47 49 52 20 50 53 15 19 54 55 57 58 56 62 63 61 66 67 59 69 71 60 70 72 64 73 75 65 74 76 68 89 92 80 90 93 82 91 94
result:
ok count=28
Test #68:
score: 0
Accepted
time: 1ms
memory: 5760kb
input:
98 2 3 2 1 2 2 1 3 3 3 2 1 3 1 1 2 2 2 2 1 1 2 2 1 2 1 3 2 1 3 3 1 2 1 2 1 1 3 2 1 2 3 1 2 3 3 3 3 2 2 3 1 3 2 1 1 1 3 3 1 3 2 2 1 3 1 3 3 3 1 1 2 1 1 2 3 2 3 2 1 3 1 1 2 3 1 3 3 2 3 3 1 3 1 3 1 3 2
output:
27 9 15 19 12 16 20 7 21 23 1 2 25 26 27 28 8 10 31 29 32 33 30 34 35 14 18 45 3 4 46 36 38 47 39 40 50 37 48 51 42 43 52 41 49 54 44 53 55 6 22 57 13 17 58 11 24 60 56 61 64 59 62 66 67 71 72 63 74 75 65 76 77 68 78 79 69 83 84 70 88 89
result:
ok count=27
Test #69:
score: 0
Accepted
time: 1ms
memory: 5836kb
input:
100 1 3 1 3 1 1 2 3 1 2 2 2 1 3 3 3 3 1 2 3 1 1 3 2 2 2 3 3 2 1 1 3 1 3 2 2 1 1 1 3 1 3 2 3 2 2 2 1 3 3 1 1 1 1 1 3 2 2 2 3 3 2 1 3 2 3 3 1 1 1 2 2 2 2 2 1 1 3 2 3 2 3 1 3 1 1 3 3 2 1 2 2 3 3 3 3 1 1 3 1
output:
30 0 6 7 1 9 12 2 10 13 4 11 14 5 18 19 8 23 26 17 24 27 3 25 29 15 28 30 16 34 36 22 35 37 20 42 43 31 44 47 21 45 48 32 46 49 38 56 59 40 57 60 33 58 62 50 61 63 51 64 65 39 70 75 41 71 76 52 72 77 53 73 79 54 74 81 55 78 82 67 80 83 66 88 89 68 90 92 69 91 93
result:
ok count=30
Test #70:
score: 0
Accepted
time: 1ms
memory: 7812kb
input:
100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 0 29 58
result:
ok count=1
Test #71:
score: 0
Accepted
time: 0ms
memory: 6104kb
input:
100 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 2 2 2
output:
1 29 30 93
result:
ok count=1
Test #72:
score: 0
Accepted
time: 1ms
memory: 5840kb
input:
99 1 1 3 3 2 1 2 2 2 2 1 2 1 3 1 3 3 1 3 3 2 2 2 1 2 2 2 2 2 2 1 2 1 2 3 2 3 2 1 2 1 3 1 2 2 1 2 3 2 2 1 3 2 1 2 3 2 2 1 2 3 1 1 3 3 3 3 3 3 1 1 3 1 3 1 1 1 3 1 1 3 1 3 3 1 3 3 3 2 1 1 3 3 2 3 3 1 2 1
output:
33 2 4 62 1 8 63 5 9 64 10 11 65 17 21 66 12 27 67 14 28 68 3 6 69 19 20 70 23 29 71 13 22 72 30 31 73 15 24 74 16 25 75 18 26 76 32 33 77 34 35 78 36 37 79 38 39 80 41 43 81 40 44 82 42 46 83 47 48 84 45 49 85 50 54 86 53 57 87 60 88 89 51 52 90 0 7 91 58 59 92 61 93 94 55 56 96 95 97 98
result:
ok count=33
Test #73:
score: 0
Accepted
time: 0ms
memory: 5836kb
input:
96 3 2 1 2 3 1 2 1 2 1 2 2 1 1 2 2 3 2 1 3 2 2 1 2 3 2 1 2 3 3 3 3 1 2 2 2 2 2 1 1 1 1 3 1 2 1 1 3 3 1 3 3 1 3 3 1 1 1 3 3 3 1 3 1 1 3 3 1 3 3 3 3 2 1 2 3 2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 3 2 1 2 1
output:
32 28 33 38 29 34 39 30 35 40 31 36 41 0 1 43 42 44 45 16 17 46 9 11 47 2 3 48 19 20 49 5 8 50 7 10 51 24 25 52 13 15 53 12 14 54 4 6 55 18 21 58 22 23 59 26 27 60 32 37 62 65 72 73 56 74 75 57 76 77 61 78 79 66 80 81 68 82 83 63 84 85 64 86 87 69 88 89 67 90 91 70 92 93 71 94 95
result:
ok count=32
Test #74:
score: 0
Accepted
time: 1ms
memory: 5776kb
input:
99 3 2 1 2 1 1 1 3 2 3 1 2 1 2 3 3 3 1 3 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 3 2 3 2 3 2 2 3 1 2 2 2 2 3 2 1 1 1 3 2 3 2 2 2 3 1 3 2 1 2 3 2 2 2 2 2 2 2 1 1 3 1 1 3 3 2 3 2 2 2 3 2 2 3 1 3 1
output:
33 0 1 4 2 3 7 5 8 9 6 11 14 10 13 15 12 43 44 17 45 46 21 47 49 16 48 50 22 51 55 18 52 57 19 53 58 20 54 59 28 56 60 30 61 62 31 63 66 23 64 67 32 65 68 24 69 70 33 71 72 25 73 80 26 74 81 34 75 82 27 76 83 29 77 84 36 78 85 37 79 86 38 87 88 39 89 92 40 90 95 35 91 96 41 93 97 42 94 98
result:
ok count=33
Test #75:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
93 3 2 3 2 3 2 1 2 3 2 3 2 3 2 3 1 3 1 3 1 1 1 3 3 1 3 3 3 1 1 3 1 1 1 3 3 1 3 3 1 2 2 3 1 1 2 3 2 1 3 3 1 3 2 2 2 2 2 2 2 3 2 3 3 1 1 1 3 1 2 2 3 1 2 1 2 1 2 3 2 2 1 1 2 2 2 2 2 3 1 1 1 1
output:
31 6 7 14 2 3 15 4 5 17 0 1 19 8 9 20 10 11 21 12 13 24 28 40 42 16 41 43 29 45 46 18 47 48 31 53 60 32 54 62 33 55 63 22 56 64 23 57 65 25 58 66 36 59 67 26 61 68 39 69 71 27 70 72 30 73 74 34 75 76 44 77 78 35 79 81 37 80 82 51 83 88 38 84 89 49 85 90 50 86 91 52 87 92
result:
ok count=31
Test #76:
score: 0
Accepted
time: 1ms
memory: 6028kb
input:
90 3 3 3 3 2 2 2 2 3 2 1 2 3 2 3 2 1 1 2 2 3 3 2 2 1 3 2 2 1 2 1 1 3 1 3 2 3 3 3 1 1 1 3 1 3 2 3 1 1 3 1 2 1 1 3 3 3 1 2 1 1 2 1 3 3 3 1 1 3 1 2 2 1 2 1 3 2 3 2 2 3 1 2 1 2 1 2 1 2 3
output:
30 12 13 31 24 26 32 1 5 33 28 29 34 30 35 36 16 18 37 17 19 38 2 6 39 14 15 40 3 7 41 10 11 42 8 9 43 0 4 47 20 22 48 21 23 50 25 27 52 44 45 53 46 51 57 49 58 59 54 61 62 55 70 72 56 71 74 60 73 75 66 76 77 67 78 80 63 79 81 64 82 83 65 84 85 68 86 87 69 88 89
result:
ok count=30
Test #77:
score: 0
Accepted
time: 1ms
memory: 6104kb
input:
100 2 1 2 2 2 3 2 2 1 2 1 2 2 1 2 2 2 2 1 2 2 3 2 2 2 2 2 1 2 2 2 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 1 1 1 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 2 3 1 2 1 1 1 1 2 2 3 2 2 3 2 2 2 2 1 2 2
output:
20 8 9 31 10 11 32 5 6 33 21 22 34 13 14 40 1 2 41 18 19 42 27 28 45 35 66 67 50 68 70 36 69 73 37 71 80 51 72 81 52 74 83 54 75 84 55 76 85 56 77 86 38 78 89 39 79 92 59 82 97
result:
ok count=20
Test #78:
score: 0
Accepted
time: 1ms
memory: 5776kb
input:
99 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 3 2 2 2 2 2 3 2 1 2 3 2 2 2 2 2 2 1 1 1 1 1 3 3 1 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 1 1 3 3 3 3 3 2 2 3 3 1 2 3 2 2 2 1 2 1 3 1 1 2 1 2 1 1 1 2 3 2 2 2 2 2 1 1 2
output:
18 22 23 33 26 27 34 16 17 35 9 10 38 7 8 39 24 25 42 36 67 69 37 68 70 40 72 73 43 74 77 46 75 79 41 76 80 49 78 81 50 83 84 54 85 86 44 89 90 55 91 96 58 92 97
result:
ok count=18
Test #79:
score: 0
Accepted
time: 1ms
memory: 5996kb
input:
98 3 2 2 2 2 2 2 3 3 2 2 2 1 2 1 2 2 2 2 2 2 3 1 3 1 3 2 3 2 1 2 2 1 1 1 3 3 3 3 1 3 1 1 1 3 3 1 3 3 3 1 3 1 3 3 1 3 3 1 1 3 3 3 3 2 2 2 2 2 2 2 2 2 1 3 2 2 2 3 2 2 2 2 3 2 1 2 2 2 2 2 2 2 2 2 2 2 1
output:
15 14 15 23 0 1 24 7 9 29 25 26 32 27 28 33 21 30 34 12 13 35 22 31 36 8 10 39 37 64 73 41 65 74 42 66 78 43 67 83 38 68 85 40 69 97
result:
ok count=15
Test #80:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
97 2 2 1 3 2 2 1 2 2 2 1 2 1 1 1 1 2 2 3 2 3 1 2 2 2 3 2 3 3 2 2 2 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 1 1 1 1 3 1 1 1 3 1 3 1 3 1 1 3 1 2 2 1 2 1 2 2 2 2 2 1 3 2 2 1 3 1 2 3 1 2 2 1 2 2 2 2 3 3 2 2 1 1
output:
21 18 23 32 15 19 33 20 24 34 25 26 35 27 29 36 28 30 37 3 4 38 21 22 42 2 5 43 6 7 44 10 11 46 13 16 51 14 17 55 12 31 57 59 64 66 62 65 68 39 67 75 40 69 79 41 70 82 45 71 91 47 72 92
result:
ok count=21
Test #81:
score: 0
Accepted
time: 1ms
memory: 5988kb
input:
99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
output:
33 0 33 66 1 34 67 2 35 68 3 36 69 4 37 70 5 38 71 6 39 72 7 40 73 8 41 74 9 42 75 10 43 76 11 44 77 12 45 78 13 46 79 14 47 80 15 48 81 16 49 82 17 50 83 18 51 84 19 52 85 20 53 86 21 54 87 22 55 88 23 56 89 24 57 90 25 58 91 26 59 92 27 60 93 28 61 94 29 62 95 30 63 96 31 64 97 32 65 98
result:
ok count=33
Test #82:
score: 0
Accepted
time: 1ms
memory: 6104kb
input:
99 3 2 3 3 1 2 1 1 1 1 2 2 3 1 3 1 3 3 2 3 3 2 3 3 1 2 3 3 1 1 1 2 1 1 1 1 3 1 1 2 1 2 1 2 3 3 2 3 1 2 2 1 2 3 3 3 1 3 2 2 2 2 2 2 2 2 3 3 1 2 2 2 1 3 3 1 3 2 2 3 2 2 3 2 1 2 1 3 1 3 3 1 2 1 1 3 1 3 1
output:
33 7 10 12 8 18 19 9 21 22 15 25 26 17 41 42 24 43 44 28 46 47 20 49 51 29 50 53 30 52 54 33 58 66 34 59 67 23 60 68 27 61 72 35 62 73 37 63 74 36 64 75 38 65 76 48 69 79 56 70 82 45 71 84 55 77 86 4 80 87 57 78 88 6 81 89 13 83 90 0 1 91 2 5 93 3 11 94 32 85 95 14 31 96 40 92 97 16 39 98
result:
ok count=33
Test #83:
score: 0
Accepted
time: 1ms
memory: 5772kb
input:
96 3 3 3 2 2 1 2 3 1 3 3 1 3 2 1 2 1 3 2 1 2 1 2 1 2 2 2 1 1 1 3 2 3 3 3 3 1 2 3 3 1 1 3 2 3 1 3 1 2 3 1 3 2 2 2 1 1 1 2 2 1 1 2 3 3 2 1 2 2 1 2 2 2 3 3 3 1 3 3 2 2 3 1 3 2 1 2 3 1 1 2 3 1 1 1 3
output:
32 11 26 33 14 31 34 7 13 36 35 37 40 41 43 44 45 48 49 38 52 55 39 53 56 42 54 57 46 58 60 51 59 61 47 62 63 64 65 66 30 68 69 50 67 73 5 24 74 16 70 75 9 15 76 19 71 77 21 72 78 23 79 81 10 18 82 27 80 83 12 20 85 28 84 87 17 22 88 0 3 89 29 86 91 1 4 92 2 6 93 32 90 94 8 25 95
result:
ok count=32
Test #84:
score: 0
Accepted
time: 1ms
memory: 5808kb
input:
3000 2 3 2 3 3 1 2 3 1 3 2 1 1 2 3 2 2 2 3 1 2 1 3 2 3 2 1 2 3 3 2 1 3 3 3 3 3 3 2 1 1 2 2 1 1 2 3 1 1 2 2 3 3 1 2 2 3 2 1 1 1 3 1 2 2 3 3 1 1 1 3 2 1 2 1 3 2 2 1 1 2 3 3 3 3 2 3 1 2 2 3 2 3 1 3 3 3 3 1 3 2 2 2 2 1 3 2 2 2 1 2 2 3 2 2 1 1 1 1 1 2 3 2 1 2 3 3 3 2 3 3 3 3 2 3 2 2 2 2 1 3 3 1 1 1 1 2 3...
output:
999 84 88 198 86 89 200 90 91 201 92 100 202 94 101 204 95 102 205 96 103 206 97 106 208 196 199 216 203 207 218 99 107 220 105 108 221 9 16 225 1 2 226 14 214 227 18 217 229 22 219 230 24 223 231 28 228 232 29 254 257 32 258 260 65 263 265 81 266 271 39 77 274 276 277 278 279 280 281 272 282 283 27...
result:
ok count=999
Test #85:
score: 0
Accepted
time: 1ms
memory: 5800kb
input:
2997 1 3 1 3 2 1 3 3 2 2 2 1 1 2 3 3 3 1 3 2 3 3 2 1 2 3 1 2 2 2 2 1 3 3 2 1 2 2 3 2 2 2 2 1 3 1 3 3 3 3 1 3 3 1 3 1 3 2 3 1 2 3 1 2 2 3 3 1 3 3 3 3 3 3 1 1 1 3 3 1 3 3 1 1 1 3 2 3 3 2 3 3 3 1 3 3 2 1 1 1 2 1 1 1 1 3 3 3 3 2 3 1 3 3 2 1 3 1 3 1 1 3 2 1 2 3 1 2 2 2 3 1 3 2 2 3 2 3 3 3 1 2 3 2 1 1 3 1...
output:
995 72 171 173 73 178 181 77 180 184 78 183 188 80 187 191 81 207 208 85 209 210 88 231 232 91 251 252 92 255 256 94 269 270 95 273 275 105 285 286 106 287 288 107 299 303 108 302 308 112 305 309 113 311 312 116 313 314 118 333 334 121 336 340 139 343 344 146 355 357 152 358 360 154 364 365 155 367 ...
result:
ok count=995
Test #86:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
18 2 1 2 2 2 2 1 3 1 3 3 3 2 2 2 2 3 2
output:
2 1 2 7 6 12 16
result:
ok count=2
Test #87:
score: 0
Accepted
time: 0ms
memory: 5764kb
input:
17 1 2 2 2 2 1 1 1 1 3 2 2 1 2 1 2 2
output:
1 0 1 9
result:
ok count=1
Test #88:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
16 1 2 2 2 2 3 3 1 3 3 2 2 2 2 3 2
output:
2 0 1 5 7 10 14
result:
ok count=2
Test #89:
score: 0
Accepted
time: 1ms
memory: 5836kb
input:
90 3 2 3 2 2 1 1 3 2 2 1 1 1 1 1 2 2 1 2 3 3 3 3 3 1 1 3 2 3 2 3 2 3 2 2 3 3 2 1 2 2 2 2 1 3 1 3 3 1 1 1 2 3 1 1 2 3 3 2 3 3 2 2 2 1 2 1 2 1 3 2 3 3 3 1 1 2 1 1 3 1 3 1 1 2 2 1 3 1 3
output:
29 5 9 19 12 15 20 13 16 21 14 18 22 17 27 28 24 29 30 25 31 32 6 40 44 10 41 46 11 42 47 38 51 52 23 33 54 43 55 56 26 34 64 57 58 66 59 61 68 45 63 69 48 65 71 49 67 72 50 70 73 60 62 74 35 37 75 36 39 77 2 3 78 53 76 79 7 8 80 0 1 82 81 84 86 83 85 87
result:
ok count=29
Test #90:
score: 0
Accepted
time: 1ms
memory: 5984kb
input:
15 2 3 3 2 1 3 2 1 1 1 3 2 3 1 2
output:
3 1 3 4 2 6 7 8 11 12
result:
ok count=3
Test #91:
score: 0
Accepted
time: 1ms
memory: 5988kb
input:
18 3 3 3 1 1 3 2 2 1 2 1 2 3 2 2 1 3 1
output:
6 0 6 8 1 7 10 3 9 12 2 11 15 4 13 16 5 14 17
result:
ok count=6
Test #92:
score: 0
Accepted
time: 0ms
memory: 6024kb
input:
16 1 3 3 2 1 3 1 2 2 2 3 1 3 2 1 2
output:
5 1 3 4 0 7 10 2 8 11 6 9 12 5 13 14
result:
ok count=5
Test #93:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
15 1 3 1 2 3 2 3 3 2 1 2 2 1 1 3
output:
5 2 5 6 1 8 9 7 10 12 4 11 13 0 3 14
result:
ok count=5
Test #94:
score: 0
Accepted
time: 1ms
memory: 5984kb
input:
18 1 3 1 3 2 1 1 3 2 2 2 3 2 3 2 1 1 3
output:
6 1 4 5 0 8 11 2 9 13 3 10 15 7 12 16 6 14 17
result:
ok count=6
Test #95:
score: 0
Accepted
time: 1ms
memory: 5844kb
input:
18 1 3 3 2 1 1 1 2 3 2 1 1 2 3 2 3 2 3
output:
6 1 3 4 0 7 8 2 9 10 5 12 13 6 14 15 11 16 17
result:
ok count=6
Test #96:
score: 0
Accepted
time: 1ms
memory: 5984kb
input:
18 1 2 1 2 3 2 3 3 2 2 3 1 1 3 3 1 2 1
output:
6 2 3 10 4 5 11 6 8 12 0 1 13 7 9 15 14 16 17
result:
ok count=6
Test #97:
score: 0
Accepted
time: 1ms
memory: 5844kb
input:
15 1 2 1 2 3 3 1 1 1 2 3 2 3 2 3
output:
5 0 1 4 2 3 5 6 9 10 7 11 12 8 13 14
result:
ok count=5
Test #98:
score: 0
Accepted
time: 0ms
memory: 5828kb
input:
18 3 2 1 2 1 3 3 1 1 3 2 1 2 3 2 1 2 3
output:
6 0 1 4 2 3 5 6 10 11 7 12 13 9 14 15 8 16 17
result:
ok count=6
Test #99:
score: 0
Accepted
time: 0ms
memory: 5712kb
input:
15 1 2 3 2 3 3 3 1 3 2 1 2 1 2 1
output:
5 0 1 4 2 3 7 5 9 10 6 11 12 8 13 14
result:
ok count=5
Test #100:
score: 0
Accepted
time: 1ms
memory: 6096kb
input:
91 2 1 2 2 1 3 1 2 1 2 2 1 2 3 3 1 2 2 2 1 3 1 3 1 1 3 1 2 1 2 1 3 1 1 3 2 3 1 2 3 2 2 2 2 1 2 1 1 3 2 2 2 1 1 2 3 3 2 3 3 3 3 1 1 3 2 3 3 1 3 3 3 3 3 2 1 2 2 2 3 2 3 2 1 3 1 3 1 3 1 1
output:
29 11 12 22 15 16 25 1 2 31 4 7 34 23 27 36 24 29 39 26 35 48 28 38 55 30 40 56 32 41 58 33 42 59 37 43 60 44 45 61 20 57 62 46 49 64 47 50 66 6 9 67 53 54 69 8 10 70 63 65 71 72 74 75 68 76 79 19 78 81 73 77 83 21 80 84 5 17 85 52 82 86 13 18 87 14 51 89
result:
ok count=29
Test #101:
score: 0
Accepted
time: 1ms
memory: 6100kb
input:
92 3 1 3 3 3 3 3 1 3 2 1 3 3 3 1 1 1 2 2 1 2 1 2 2 2 3 2 1 3 3 2 3 3 2 3 3 2 3 3 2 2 1 2 2 3 3 2 2 2 3 2 1 3 2 1 2 1 1 1 1 1 3 1 3 1 2 1 1 2 2 2 2 3 1 1 3 2 1 1 1 1 1 1 3 1 2 2 3 3 2 2 2
output:
29 2 17 19 3 18 21 1 20 25 4 22 27 7 23 28 14 24 29 15 26 31 16 30 32 5 33 41 6 36 51 8 39 54 11 40 56 12 42 57 13 43 58 34 46 59 35 47 60 37 48 62 38 50 64 44 53 66 45 55 67 10 71 72 49 65 73 52 68 74 61 69 77 63 70 78 0 9 79 75 76 80 81 85 87 82 86 88
result:
ok count=29
Test #102:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
93 1 1 3 1 1 3 1 1 2 3 1 1 1 2 3 3 2 1 1 3 1 3 3 2 3 3 1 3 2 2 3 3 1 3 1 1 1 2 2 3 1 2 3 1 3 3 2 3 2 3 2 3 2 3 2 3 3 2 1 3 2 2 1 1 1 2 1 1 2 2 2 1 1 2 3 1 2 2 3 3 2 1 2 2 1 2 2 2 2 3 3 2 2
output:
28 0 8 9 1 13 14 2 16 17 3 23 24 4 28 30 6 29 31 7 37 39 5 38 40 10 41 42 11 46 47 12 48 49 18 50 51 20 52 53 26 54 55 15 57 58 19 60 62 21 61 63 22 65 66 25 68 71 27 69 72 32 70 74 33 73 75 34 76 78 35 77 79 44 80 81 45 82 84 36 83 89 43 85 90
result:
ok count=28
Test #103:
score: 0
Accepted
time: 0ms
memory: 5832kb
input:
94 3 3 1 1 3 2 1 3 2 1 2 1 1 2 2 2 2 3 2 2 1 1 3 1 2 1 2 3 3 3 2 2 1 3 2 1 2 2 1 2 3 1 2 1 2 1 3 1 3 1 3 3 2 2 2 1 1 3 2 2 3 3 3 2 2 3 3 3 2 3 2 1 2 2 1 1 2 1 1 1 3 2 2 1 3 3 1 3 1 3 3 3 2 1
output:
30 28 31 35 29 34 38 33 36 41 40 42 43 1 8 45 4 10 47 7 14 49 46 52 55 48 53 56 6 19 65 21 44 66 23 54 67 25 58 69 17 18 71 0 5 74 22 24 75 50 59 77 51 63 78 57 64 79 3 15 80 60 68 83 12 16 84 9 26 85 61 70 86 11 37 87 62 72 88 20 39 89 2 13 90 32 73 91 27 30 93
result:
ok count=30
Test #104:
score: 0
Accepted
time: 1ms
memory: 5808kb
input:
94 3 2 3 2 1 2 1 3 3 2 1 3 2 3 1 3 2 1 2 2 2 3 3 1 3 3 1 2 1 1 1 2 3 2 1 2 2 2 2 2 3 1 3 3 2 3 3 3 1 1 1 2 1 1 1 3 3 3 1 1 3 1 3 1 2 3 3 2 1 1 2 3 2 1 2 2 3 1 3 3 1 1 1 3 2 3 1 2 2 2 2 3 1 1
output:
29 4 5 7 6 19 21 10 20 22 25 31 34 14 35 40 32 33 41 17 36 42 23 37 43 26 38 45 28 39 46 29 44 47 8 9 48 11 12 49 13 16 50 15 18 52 2 3 53 0 1 54 30 51 55 24 27 58 59 64 65 56 67 68 61 70 71 57 72 73 63 74 76 60 75 77 69 84 85 80 87 91 62 88 92 66 89 93
result:
ok count=29
Test #105:
score: 0
Accepted
time: 1ms
memory: 5768kb
input:
96 2 3 2 1 1 1 1 3 3 2 2 1 2 1 3 3 3 2 3 2 1 3 2 1 2 3 2 2 3 2 1 2 2 1 1 3 1 2 3 3 3 3 3 1 1 2 1 1 2 2 2 1 3 3 1 1 3 2 3 1 1 3 2 1 1 1 2 1 3 2 2 3 3 2 2 3 3 1 1 1 3 1 3 3 3 3 1 3 3 2 2 2 1 1 1 2
output:
28 16 22 23 6 24 25 3 27 28 21 26 30 1 2 33 14 29 34 4 12 35 18 31 36 5 17 38 11 32 39 13 37 40 7 9 43 8 10 44 41 45 46 42 48 51 47 49 52 20 50 53 15 19 54 55 57 58 56 62 63 61 66 67 59 69 71 60 70 72 64 73 75 65 74 76 68 89 92 80 90 93 82 91 94
result:
ok count=28
Test #106:
score: 0
Accepted
time: 1ms
memory: 5756kb
input:
98 2 3 2 1 2 2 1 3 3 3 2 1 3 1 1 2 2 2 2 1 1 2 2 1 2 1 3 2 1 3 3 1 2 1 2 1 1 3 2 1 2 3 1 2 3 3 3 3 2 2 3 1 3 2 1 1 1 3 3 1 3 2 2 1 3 1 3 3 3 1 1 2 1 1 2 3 2 3 2 1 3 1 1 2 3 1 3 3 2 3 3 1 3 1 3 1 3 2
output:
27 9 15 19 12 16 20 7 21 23 1 2 25 26 27 28 8 10 31 29 32 33 30 34 35 14 18 45 3 4 46 36 38 47 39 40 50 37 48 51 42 43 52 41 49 54 44 53 55 6 22 57 13 17 58 11 24 60 56 61 64 59 62 66 67 71 72 63 74 75 65 76 77 68 78 79 69 83 84 70 88 89
result:
ok count=27
Test #107:
score: 0
Accepted
time: 1ms
memory: 5772kb
input:
100 1 3 1 3 1 1 2 3 1 2 2 2 1 3 3 3 3 1 2 3 1 1 3 2 2 2 3 3 2 1 1 3 1 3 2 2 1 1 1 3 1 3 2 3 2 2 2 1 3 3 1 1 1 1 1 3 2 2 2 3 3 2 1 3 2 3 3 1 1 1 2 2 2 2 2 1 1 3 2 3 2 3 1 3 1 1 3 3 2 1 2 2 3 3 3 3 1 1 3 1
output:
30 0 6 7 1 9 12 2 10 13 4 11 14 5 18 19 8 23 26 17 24 27 3 25 29 15 28 30 16 34 36 22 35 37 20 42 43 31 44 47 21 45 48 32 46 49 38 56 59 40 57 60 33 58 62 50 61 63 51 64 65 39 70 75 41 71 76 52 72 77 53 73 79 54 74 81 55 78 82 67 80 83 66 88 89 68 90 92 69 91 93
result:
ok count=30
Test #108:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 0 29 58
result:
ok count=1
Test #109:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
100 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 2 2 2
output:
1 29 30 93
result:
ok count=1
Test #110:
score: 0
Accepted
time: 1ms
memory: 5708kb
input:
99 1 1 3 3 2 1 2 2 2 2 1 2 1 3 1 3 3 1 3 3 2 2 2 1 2 2 2 2 2 2 1 2 1 2 3 2 3 2 1 2 1 3 1 2 2 1 2 3 2 2 1 3 2 1 2 3 2 2 1 2 3 1 1 3 3 3 3 3 3 1 1 3 1 3 1 1 1 3 1 1 3 1 3 3 1 3 3 3 2 1 1 3 3 2 3 3 1 2 1
output:
33 2 4 62 1 8 63 5 9 64 10 11 65 17 21 66 12 27 67 14 28 68 3 6 69 19 20 70 23 29 71 13 22 72 30 31 73 15 24 74 16 25 75 18 26 76 32 33 77 34 35 78 36 37 79 38 39 80 41 43 81 40 44 82 42 46 83 47 48 84 45 49 85 50 54 86 53 57 87 60 88 89 51 52 90 0 7 91 58 59 92 61 93 94 55 56 96 95 97 98
result:
ok count=33
Test #111:
score: 0
Accepted
time: 0ms
memory: 5776kb
input:
96 3 2 1 2 3 1 2 1 2 1 2 2 1 1 2 2 3 2 1 3 2 2 1 2 3 2 1 2 3 3 3 3 1 2 2 2 2 2 1 1 1 1 3 1 2 1 1 3 3 1 3 3 1 3 3 1 1 1 3 3 3 1 3 1 1 3 3 1 3 3 3 3 2 1 2 3 2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 3 2 1 2 1
output:
32 28 33 38 29 34 39 30 35 40 31 36 41 0 1 43 42 44 45 16 17 46 9 11 47 2 3 48 19 20 49 5 8 50 7 10 51 24 25 52 13 15 53 12 14 54 4 6 55 18 21 58 22 23 59 26 27 60 32 37 62 65 72 73 56 74 75 57 76 77 61 78 79 66 80 81 68 82 83 63 84 85 64 86 87 69 88 89 67 90 91 70 92 93 71 94 95
result:
ok count=32
Test #112:
score: 0
Accepted
time: 0ms
memory: 5836kb
input:
99 3 2 1 2 1 1 1 3 2 3 1 2 1 2 3 3 3 1 3 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 3 2 3 2 3 2 2 3 1 2 2 2 2 3 2 1 1 1 3 2 3 2 2 2 3 1 3 2 1 2 3 2 2 2 2 2 2 2 1 1 3 1 1 3 3 2 3 2 2 2 3 2 2 3 1 3 1
output:
33 0 1 4 2 3 7 5 8 9 6 11 14 10 13 15 12 43 44 17 45 46 21 47 49 16 48 50 22 51 55 18 52 57 19 53 58 20 54 59 28 56 60 30 61 62 31 63 66 23 64 67 32 65 68 24 69 70 33 71 72 25 73 80 26 74 81 34 75 82 27 76 83 29 77 84 36 78 85 37 79 86 38 87 88 39 89 92 40 90 95 35 91 96 41 93 97 42 94 98
result:
ok count=33
Test #113:
score: 0
Accepted
time: 0ms
memory: 5768kb
input:
93 3 2 3 2 3 2 1 2 3 2 3 2 3 2 3 1 3 1 3 1 1 1 3 3 1 3 3 3 1 1 3 1 1 1 3 3 1 3 3 1 2 2 3 1 1 2 3 2 1 3 3 1 3 2 2 2 2 2 2 2 3 2 3 3 1 1 1 3 1 2 2 3 1 2 1 2 1 2 3 2 2 1 1 2 2 2 2 2 3 1 1 1 1
output:
31 6 7 14 2 3 15 4 5 17 0 1 19 8 9 20 10 11 21 12 13 24 28 40 42 16 41 43 29 45 46 18 47 48 31 53 60 32 54 62 33 55 63 22 56 64 23 57 65 25 58 66 36 59 67 26 61 68 39 69 71 27 70 72 30 73 74 34 75 76 44 77 78 35 79 81 37 80 82 51 83 88 38 84 89 49 85 90 50 86 91 52 87 92
result:
ok count=31
Test #114:
score: 0
Accepted
time: 0ms
memory: 5848kb
input:
90 3 3 3 3 2 2 2 2 3 2 1 2 3 2 3 2 1 1 2 2 3 3 2 2 1 3 2 2 1 2 1 1 3 1 3 2 3 3 3 1 1 1 3 1 3 2 3 1 1 3 1 2 1 1 3 3 3 1 2 1 1 2 1 3 3 3 1 1 3 1 2 2 1 2 1 3 2 3 2 2 3 1 2 1 2 1 2 1 2 3
output:
30 12 13 31 24 26 32 1 5 33 28 29 34 30 35 36 16 18 37 17 19 38 2 6 39 14 15 40 3 7 41 10 11 42 8 9 43 0 4 47 20 22 48 21 23 50 25 27 52 44 45 53 46 51 57 49 58 59 54 61 62 55 70 72 56 71 74 60 73 75 66 76 77 67 78 80 63 79 81 64 82 83 65 84 85 68 86 87 69 88 89
result:
ok count=30
Test #115:
score: 0
Accepted
time: 1ms
memory: 5808kb
input:
100 2 1 2 2 2 3 2 2 1 2 1 2 2 1 2 2 2 2 1 2 2 3 2 2 2 2 2 1 2 2 2 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 1 1 1 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 3 3 2 3 2 2 1 2 2 3 2 2 2 2 2 2 3 1 2 1 1 1 1 2 2 3 2 2 3 2 2 2 2 1 2 2
output:
20 8 9 31 10 11 32 5 6 33 21 22 34 13 14 40 1 2 41 18 19 42 27 28 45 35 66 67 50 68 70 36 69 73 37 71 80 51 72 81 52 74 83 54 75 84 55 76 85 56 77 86 38 78 89 39 79 92 59 82 97
result:
ok count=20
Test #116:
score: 0
Accepted
time: 1ms
memory: 6024kb
input:
99 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 3 2 2 2 2 2 3 2 1 2 3 2 2 2 2 2 2 1 1 1 1 1 3 3 1 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 1 1 3 3 3 3 3 2 2 3 3 1 2 3 2 2 2 1 2 1 3 1 1 2 1 2 1 1 1 2 3 2 2 2 2 2 1 1 2
output:
18 22 23 33 26 27 34 16 17 35 9 10 38 7 8 39 24 25 42 36 67 69 37 68 70 40 72 73 43 74 77 46 75 79 41 76 80 49 78 81 50 83 84 54 85 86 44 89 90 55 91 96 58 92 97
result:
ok count=18
Test #117:
score: 0
Accepted
time: 1ms
memory: 5780kb
input:
98 3 2 2 2 2 2 2 3 3 2 2 2 1 2 1 2 2 2 2 2 2 3 1 3 1 3 2 3 2 1 2 2 1 1 1 3 3 3 3 1 3 1 1 1 3 3 1 3 3 3 1 3 1 3 3 1 3 3 1 1 3 3 3 3 2 2 2 2 2 2 2 2 2 1 3 2 2 2 3 2 2 2 2 3 2 1 2 2 2 2 2 2 2 2 2 2 2 1
output:
15 14 15 23 0 1 24 7 9 29 25 26 32 27 28 33 21 30 34 12 13 35 22 31 36 8 10 39 37 64 73 41 65 74 42 66 78 43 67 83 38 68 85 40 69 97
result:
ok count=15
Test #118:
score: 0
Accepted
time: 1ms
memory: 5840kb
input:
97 2 2 1 3 2 2 1 2 2 2 1 2 1 1 1 1 2 2 3 2 3 1 2 2 2 3 2 3 3 2 2 2 1 3 1 1 1 1 1 1 1 1 3 3 3 1 3 1 1 1 1 3 1 1 1 3 1 3 1 3 1 1 3 1 2 2 1 2 1 2 2 2 2 2 1 3 2 2 1 3 1 2 3 1 2 2 1 2 2 2 2 3 3 2 2 1 1
output:
21 18 23 32 15 19 33 20 24 34 25 26 35 27 29 36 28 30 37 3 4 38 21 22 42 2 5 43 6 7 44 10 11 46 13 16 51 14 17 55 12 31 57 59 64 66 62 65 68 39 67 75 40 69 79 41 70 82 45 71 91 47 72 92
result:
ok count=21
Test #119:
score: 0
Accepted
time: 0ms
memory: 5764kb
input:
99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
output:
33 0 33 66 1 34 67 2 35 68 3 36 69 4 37 70 5 38 71 6 39 72 7 40 73 8 41 74 9 42 75 10 43 76 11 44 77 12 45 78 13 46 79 14 47 80 15 48 81 16 49 82 17 50 83 18 51 84 19 52 85 20 53 86 21 54 87 22 55 88 23 56 89 24 57 90 25 58 91 26 59 92 27 60 93 28 61 94 29 62 95 30 63 96 31 64 97 32 65 98
result:
ok count=33
Test #120:
score: 0
Accepted
time: 0ms
memory: 5756kb
input:
99 3 2 3 3 1 2 1 1 1 1 2 2 3 1 3 1 3 3 2 3 3 2 3 3 1 2 3 3 1 1 1 2 1 1 1 1 3 1 1 2 1 2 1 2 3 3 2 3 1 2 2 1 2 3 3 3 1 3 2 2 2 2 2 2 2 2 3 3 1 2 2 2 1 3 3 1 3 2 2 3 2 2 3 2 1 2 1 3 1 3 3 1 2 1 1 3 1 3 1
output:
33 7 10 12 8 18 19 9 21 22 15 25 26 17 41 42 24 43 44 28 46 47 20 49 51 29 50 53 30 52 54 33 58 66 34 59 67 23 60 68 27 61 72 35 62 73 37 63 74 36 64 75 38 65 76 48 69 79 56 70 82 45 71 84 55 77 86 4 80 87 57 78 88 6 81 89 13 83 90 0 1 91 2 5 93 3 11 94 32 85 95 14 31 96 40 92 97 16 39 98
result:
ok count=33
Test #121:
score: 0
Accepted
time: 1ms
memory: 5764kb
input:
96 3 3 3 2 2 1 2 3 1 3 3 1 3 2 1 2 1 3 2 1 2 1 2 1 2 2 2 1 1 1 3 2 3 3 3 3 1 2 3 3 1 1 3 2 3 1 3 1 2 3 1 3 2 2 2 1 1 1 2 2 1 1 2 3 3 2 1 2 2 1 2 2 2 3 3 3 1 3 3 2 2 3 1 3 2 1 2 3 1 1 2 3 1 1 1 3
output:
32 11 26 33 14 31 34 7 13 36 35 37 40 41 43 44 45 48 49 38 52 55 39 53 56 42 54 57 46 58 60 51 59 61 47 62 63 64 65 66 30 68 69 50 67 73 5 24 74 16 70 75 9 15 76 19 71 77 21 72 78 23 79 81 10 18 82 27 80 83 12 20 85 28 84 87 17 22 88 0 3 89 29 86 91 1 4 92 2 6 93 32 90 94 8 25 95
result:
ok count=32
Test #122:
score: 0
Accepted
time: 1ms
memory: 5864kb
input:
3000 2 3 2 3 3 1 2 3 1 3 2 1 1 2 3 2 2 2 3 1 2 1 3 2 3 2 1 2 3 3 2 1 3 3 3 3 3 3 2 1 1 2 2 1 1 2 3 1 1 2 2 3 3 1 2 2 3 2 1 1 1 3 1 2 2 3 3 1 1 1 3 2 1 2 1 3 2 2 1 1 2 3 3 3 3 2 3 1 2 2 3 2 3 1 3 3 3 3 1 3 2 2 2 2 1 3 2 2 2 1 2 2 3 2 2 1 1 1 1 1 2 3 2 1 2 3 3 3 2 3 3 3 3 2 3 2 2 2 2 1 3 3 1 1 1 1 2 3...
output:
999 84 88 198 86 89 200 90 91 201 92 100 202 94 101 204 95 102 205 96 103 206 97 106 208 196 199 216 203 207 218 99 107 220 105 108 221 9 16 225 1 2 226 14 214 227 18 217 229 22 219 230 24 223 231 28 228 232 29 254 257 32 258 260 65 263 265 81 266 271 39 77 274 276 277 278 279 280 281 272 282 283 27...
result:
ok count=999
Test #123:
score: 0
Accepted
time: 1ms
memory: 6056kb
input:
2997 1 3 1 3 2 1 3 3 2 2 2 1 1 2 3 3 3 1 3 2 3 3 2 1 2 3 1 2 2 2 2 1 3 3 2 1 2 2 3 2 2 2 2 1 3 1 3 3 3 3 1 3 3 1 3 1 3 2 3 1 2 3 1 2 2 3 3 1 3 3 3 3 3 3 1 1 1 3 3 1 3 3 1 1 1 3 2 3 3 2 3 3 3 1 3 3 2 1 1 1 2 1 1 1 1 3 3 3 3 2 3 1 3 3 2 1 3 1 3 1 1 3 2 1 2 3 1 2 2 2 3 1 3 2 2 3 2 3 3 3 1 2 3 2 1 1 3 1...
output:
995 72 171 173 73 178 181 77 180 184 78 183 188 80 187 191 81 207 208 85 209 210 88 231 232 91 251 252 92 255 256 94 269 270 95 273 275 105 285 286 106 287 288 107 299 303 108 302 308 112 305 309 113 311 312 116 313 314 118 333 334 121 336 340 139 343 344 146 355 357 152 358 360 154 364 365 155 367 ...
result:
ok count=995
Test #124:
score: 0
Accepted
time: 1ms
memory: 6028kb
input:
3000 1 1 1 1 1 3 1 1 3 3 1 3 1 1 2 3 1 1 2 1 2 1 3 3 3 1 1 2 1 2 2 3 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 3 3 1 1 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 2 3 1 1 1 1 3 3 2 1 3 1 1 2 3 1 2 3 1 1 1 2 1 1 1 1 2 3 2 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 3 1 3 3 1 1 1 1 3 1 1 2 1 1 1 3 3 1 1 1 1 2 1 1 1 1 1 2 3 3 1...
output:
499 0 14 15 5 18 19 8 20 21 9 27 28 1 29 31 11 30 32 22 39 40 2 46 47 23 51 52 24 54 55 48 60 61 3 67 72 4 71 77 78 79 80 6 84 85 7 87 88 81 92 93 10 97 98 12 99 117 13 105 119 16 113 120 125 128 129 132 138 139 17 144 145 133 148 149 146 162 163 151 167 169 164 168 170 171 176 177 180 181 182 184 1...
result:
ok count=499
Test #125:
score: 0
Accepted
time: 1ms
memory: 5800kb
input:
3000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 0 1374 2901
result:
ok count=1
Test #126:
score: 0
Accepted
time: 1ms
memory: 5904kb
input:
3000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 1755 1756 2819
result:
ok count=1
Test #127:
score: 0
Accepted
time: 1ms
memory: 6008kb
input:
1500 1 1 1 2 1 1 1 2 2 2 2 2 1 1 3 1 2 2 3 1 2 2 2 2 1 2 1 2 1 1 3 1 2 2 2 2 1 1 3 1 1 2 2 3 2 1 3 1 1 2 2 2 1 2 2 2 2 2 1 2 3 2 3 2 3 2 1 3 2 1 2 3 2 2 3 2 3 1 1 3 1 3 1 3 3 3 1 3 3 3 1 1 3 1 3 1 3 1 1 1 3 1 3 1 3 3 1 1 1 3 1 1 3 1 1 1 1 1 3 3 3 3 1 3 1 1 1 1 3 3 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 1 3 1...
output:
500 24 25 76 64 65 77 67 68 78 26 27 79 71 72 80 31 32 81 74 75 82 2 8 83 28 34 84 29 35 85 14 22 86 40 41 87 4 9 88 5 10 89 18 23 90 38 42 91 48 49 92 43 44 93 6 11 94 46 50 95 36 51 96 30 33 97 60 61 98 62 63 99 12 16 100 13 17 102 15 20 104 19 21 105 0 3 109 1 7 112 37 53 118 39 54 119 45 55 120 ...
result:
ok count=500
Test #128:
score: 0
Accepted
time: 1ms
memory: 5876kb
input:
3000 3 1 1 1 1 3 3 2 1 1 1 2 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 1 3 3 1 1 1 1 3 1 3 1 1 3 3 3 3 1 3 1 3 1 3 1 3 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 1 1 1 1 3 1 1 1 3 3 1 2 3 3 1 3 3 3 3 3 3 3 1 1 1 1 3 1 3 1 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 1 3 1 3 1 3 2 3 1 3 1 1 3 1 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2...
output:
1000 68 191 1775 894 1152 1776 895 1153 1777 574 660 1778 896 1154 1779 899 1155 1780 575 663 1781 901 1156 1782 579 665 1783 902 1157 1784 581 666 1785 905 1158 1786 583 667 1787 907 1159 1788 584 668 1789 587 669 1790 69 193 1791 70 194 1792 71 195 1793 73 197 1794 909 1160 1795 588 670 1796 910 1...
result:
ok count=1000
Test #129:
score: 0
Accepted
time: 0ms
memory: 5760kb
input:
3000 1 3 1 1 3 1 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 1 3 1 1 3 1 3 3 1 2 2 3 1 3 3 3 1 3 3 2 3 1 1 3 3 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 3 1 1 1 1 3 1 1 1 3 1 1 1 1 1 3 3 3 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 3 3 3 3 1 1 1...
output:
1000 793 878 1234 794 879 1236 795 880 1238 139 183 1239 145 204 1240 798 881 1241 801 882 1242 146 205 1243 147 207 1244 802 883 1245 803 884 1246 806 885 1247 148 208 1248 150 209 1249 808 886 1250 810 887 1251 813 888 1252 153 210 1253 814 889 1254 815 890 1255 154 214 1256 157 215 1257 158 216 1...
result:
ok count=1000
Test #130:
score: 0
Accepted
time: 1ms
memory: 5804kb
input:
2997 3 1 2 2 1 1 1 1 1 1 3 1 3 3 1 3 3 3 1 3 1 2 1 1 3 1 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 3 1 1 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 1 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 1 3 1 1 1 1 1 3 3 3 1 3 1 1 3 3 3 1 3 3 1 1 1 3 1 1 3 1 1 3 2 3 3 3 2 3 2 3 1 2 1 1 3 1 1 3 2 2 2 2...
output:
999 381 408 432 386 409 433 68 95 434 389 410 435 70 74 436 5 31 437 6 32 438 390 411 439 7 35 440 8 37 441 391 412 442 394 413 443 9 38 444 11 39 445 395 414 446 398 415 447 401 416 448 402 417 449 403 418 450 14 40 451 18 41 452 51 75 453 52 76 454 55 77 455 57 78 456 62 93 457 64 94 458 60 79 459...
result:
ok count=999
Test #131:
score: 0
Accepted
time: 1ms
memory: 5760kb
input:
2994 1 1 2 1 2 1 2 2 3 1 3 3 3 3 1 3 1 1 2 3 3 1 3 3 3 3 1 1 1 3 3 2 3 1 3 1 3 3 1 2 3 1 3 3 3 1 3 1 3 2 3 2 1 1 3 1 1 1 3 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 2 3 3 3 3 3 3 1 3 1 3 1 1 2 1 3 3 3 2 2 3 2 1 3 3 3 1 2 1 1 2 3 3 1 3 2 2 2 2 2 2 2 2...
output:
998 1260 1474 1852 1261 1475 1853 1265 1476 1855 1266 1477 1857 1268 1478 1858 1269 1479 1859 656 952 1860 1270 1480 1861 1271 1481 1862 660 953 1863 398 464 1864 399 465 1865 400 467 1866 401 468 1867 1272 1482 1868 402 470 1869 1273 1483 1870 1277 1484 1871 405 471 1872 406 477 1873 408 479 1874 4...
result:
ok count=998
Test #132:
score: 0
Accepted
time: 1ms
memory: 5864kb
input:
3000 1 1 1 3 2 3 2 3 1 1 1 1 2 3 1 2 1 2 1 3 3 2 2 3 3 2 3 2 2 3 3 3 3 3 1 3 2 1 2 3 2 3 3 3 2 1 3 3 3 2 1 1 1 1 2 1 3 1 3 2 2 2 1 2 3 3 3 2 1 3 1 3 2 3 1 3 2 3 3 1 2 1 2 2 3 1 3 2 2 1 1 2 3 1 1 3 1 3 2 2 3 2 2 1 3 2 2 2 3 3 2 3 1 2 2 1 1 1 2 3 2 1 3 2 1 1 1 3 3 1 3 1 3 2 2 1 1 1 1 2 1 2 3 1 2 1 2 2...
output:
1000 358 374 385 360 375 388 361 377 392 364 378 394 368 380 396 370 383 398 372 386 399 387 389 402 188 198 404 16 200 408 112 393 409 115 395 410 116 397 412 71 105 413 75 106 414 117 403 416 121 405 417 78 107 419 86 110 421 124 406 423 125 407 424 126 415 426 129 418 428 131 420 430 92 113 432 1...
result:
ok count=1000
Test #133:
score: 0
Accepted
time: 1ms
memory: 5892kb
input:
3000 2 2 1 3 2 2 2 3 2 2 2 2 2 1 2 2 2 2 2 1 3 2 2 2 2 3 2 2 2 2 2 2 1 3 2 2 2 2 2 2 2 2 2 2 1 3 2 2 2 1 2 3 2 3 1 2 2 3 2 3 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 3 2 2 1 2 3 2 1 3 3 2 3 2 2 2 3 1 2 2 2 2 1 2 3 3 1 2 1 1 2 2 2 1 2 2 2 2 2 2 1 2 3 1 2 1 2 2 3 2 2 2 2 2 2 2 2 2 3 1 2 2 2 2 3 2 3 3 1 2 2 1 2...
output:
673 284 285 999 787 792 1000 7 8 1001 20 22 1002 790 793 1003 294 296 1004 800 801 1005 295 297 1006 811 812 1007 299 300 1008 25 26 1009 45 47 1010 3 5 1011 814 815 1012 51 52 1013 826 827 1014 829 831 1015 830 832 1016 836 837 1017 840 841 1018 843 845 1019 851 852 1020 857 861 1021 53 56 1022 865...
result:
ok count=673
Test #134:
score: 0
Accepted
time: 1ms
memory: 6080kb
input:
2999 2 2 3 3 2 1 2 1 1 2 2 3 2 3 2 3 2 2 2 1 2 3 2 2 2 2 1 3 2 3 3 2 1 2 3 2 2 2 2 1 2 2 2 2 2 3 2 2 3 1 2 2 2 3 2 2 2 3 3 2 2 2 3 3 3 2 1 1 2 2 2 1 2 2 1 1 2 2 2 2 2 1 2 2 2 3 2 2 3 3 3 1 1 2 2 3 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 3 3 1 1 2 2 2 2 1 1 2 2 3 2 3 2 3 2 2 2 3 2 2 2 1 2 1 3 2 3 2 2 2 1...
output:
683 232 237 999 233 238 1000 239 240 1001 66 68 1002 241 244 1003 67 69 1004 123 125 1005 249 250 1006 252 255 1007 256 257 1008 138 139 1009 140 142 1010 266 270 1011 267 271 1012 147 149 1013 268 272 1014 148 150 1015 151 152 1016 275 279 1017 281 282 1018 71 72 1019 294 301 1020 298 302 1021 155 ...
result:
ok count=683
Test #135:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
2998 2 1 2 1 3 2 2 2 2 2 2 2 1 2 2 2 2 3 3 2 1 2 1 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 3 1 3 2 2 1 2 2 2 3 2 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 3 2 1 2 3 2 2 3 3 2 2 2 2 1 2 1 2 2 2 2 3 2 3 3 3 1 2 2 2 2 2 3 2 2 2 1 2 2 2 2 2 2 2 3 2 2 3 3 2 1 1 2 2 3 3 2 1 2 2 2 2 2 2 2 2 3 2 1 2 1 2 2 3 1 2 3 2 2 2 2...
output:
629 899 901 992 917 918 993 920 921 999 176 177 1000 925 926 1001 187 188 1002 191 194 1003 193 197 1004 927 929 1005 207 208 1006 211 212 1007 214 215 1008 223 224 1009 928 930 1010 225 226 1011 229 230 1012 938 939 1013 232 233 1014 237 238 1015 43 49 1016 941 942 1017 954 956 1018 243 244 1019 95...
result:
ok count=629
Test #136:
score: 0
Accepted
time: 0ms
memory: 5836kb
input:
2997 1 1 3 2 3 3 2 2 1 2 2 2 2 2 2 1 3 3 2 2 2 3 2 2 2 2 3 2 1 3 2 3 2 3 2 3 3 2 2 2 2 2 2 2 1 1 2 2 3 3 2 1 2 2 3 3 2 2 1 1 1 2 1 2 1 2 2 1 2 1 3 1 3 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 1 2 2 3 2 1 2 2 2 3 2 2 1 3 1 2 2 2 1 3 2 2 1 2 3 2 3 1 3 2 2 3 2 2 2 2 1 2 2 2 1 1 2 3 2 2 2 3 2 3 1 2 2 3 2 2 2...
output:
712 200 203 999 201 204 1000 28 30 1001 240 243 1002 221 222 1003 242 244 1004 228 229 1005 232 233 1006 247 248 1007 251 252 1008 237 238 1009 257 262 1010 239 241 1011 260 267 1012 276 295 1013 280 296 1014 8 10 1015 292 297 1016 253 254 1017 294 298 1018 256 259 1019 299 300 1020 303 304 1021 308...
result:
ok count=712
Test #137:
score: 0
Accepted
time: 1ms
memory: 5800kb
input:
3000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1000 0 1000 2000 1 1001 2001 2 1002 2002 3 1003 2003 4 1004 2004 5 1005 2005 6 1006 2006 7 1007 2007 8 1008 2008 9 1009 2009 10 1010 2010 11 1011 2011 12 1012 2012 13 1013 2013 14 1014 2014 15 1015 2015 16 1016 2016 17 1017 2017 18 1018 2018 19 1019 2019 20 1020 2020 21 1021 2021 22 1022 2022 23 102...
result:
ok count=1000
Test #138:
score: 0
Accepted
time: 115ms
memory: 38208kb
input:
600000 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 0 2 599999
result:
ok count=1
Test #139:
score: 0
Accepted
time: 42ms
memory: 14832kb
input:
600000 1 1 3 1 2 1 2 3 2 1 1 2 3 2 2 1 2 1 1 3 2 1 1 2 1 3 3 3 1 2 3 3 1 1 1 3 1 3 2 2 1 3 3 2 3 2 3 2 2 2 1 1 1 1 2 3 1 1 1 2 1 1 1 3 3 3 3 3 1 1 3 2 3 2 2 3 2 1 2 3 2 1 3 3 3 3 3 1 1 1 3 3 1 1 1 3 3 2 2 1 2 3 2 2 3 3 2 2 2 2 3 1 1 2 1 1 2 1 1 3 3 3 1 3 3 1 2 2 3 2 2 1 2 1 1 1 1 2 1 2 1 3 1 2 2 1 3...
output:
200000 77228 79574 79578 77229 79576 79580 77246 79577 79581 77253 79590 79592 77255 79595 79598 77258 79596 79599 77269 79597 79600 77294 79602 79605 77297 79604 79608 77298 79607 79609 77302 79617 79619 77303 79618 79620 77308 79623 79625 77323 79630 79631 77324 79634 79636 77325 79640 79641 77332...
result:
ok count=200000
Test #140:
score: 0
Accepted
time: 39ms
memory: 14744kb
input:
600000 3 1 2 3 3 2 1 1 1 2 3 2 2 3 3 3 2 2 2 2 2 3 1 3 3 1 2 1 3 1 3 1 2 3 3 3 1 1 2 1 2 1 1 3 1 3 1 2 1 1 3 2 2 2 3 2 2 2 1 1 1 3 2 1 1 1 2 3 1 2 1 1 2 3 3 3 2 3 2 2 2 1 1 2 3 1 2 1 3 2 2 3 1 1 3 1 2 2 2 1 3 3 3 1 1 2 1 1 3 3 3 2 2 3 1 2 2 1 3 1 1 2 3 3 3 3 3 1 1 3 3 3 2 1 1 3 3 2 2 2 3 2 2 3 1 1 3...
output:
200000 8355 8422 8480 8360 8425 8483 8362 8426 8491 8368 8429 8494 8370 8432 8497 8371 8437 8498 8372 8444 8500 8374 8447 8507 8376 8449 8508 8377 8460 8510 8379 8461 8511 8380 8463 8512 8382 8465 8513 8389 8468 8517 8392 8478 8521 8395 8481 8524 8397 8482 8526 8399 8487 8527 8400 8490 8533 8401 849...
result:
ok count=200000
Test #141:
score: 0
Accepted
time: 5ms
memory: 9820kb
input:
210000 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
4999 1 39 122 2 54 130 3 65 132 4 105 200 5 156 251 6 240 257 267 324 325 297 377 378 332 465 466 345 500 501 354 542 543 366 550 551 497 563 564 512 568 569 524 571 572 579 613 614 630 675 676 640 686 687 641 703 704 643 744 745 769 781 782 774 792 793 7 809 819 8 849 877 889 894 895 928 979 980 99...
result:
ok count=4999
Test #142:
score: 0
Accepted
time: 0ms
memory: 5984kb
input:
15000 1 2 1 1 1 2 3 1 2 3 3 3 2 2 1 2 1 3 3 2 3 2 1 1 2 3 3 1 1 2 1 3 2 3 1 1 2 2 2 1 3 1 2 3 3 2 2 1 2 3 3 2 2 2 2 3 3 3 2 3 3 2 1 2 3 3 1 3 3 1 1 3 3 3 2 3 2 1 3 1 1 2 1 3 1 2 1 1 2 1 2 3 2 2 3 3 2 2 1 3 3 2 3 1 2 2 3 3 2 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 1 3 1 3 2 2 2 2 3 2 1 2 2 3 3 1 2 3 1 1 3 1 2 ...
output:
5000 127 133 157 132 135 158 11 12 159 138 140 160 141 146 162 144 147 163 17 54 164 152 153 167 154 156 168 155 161 170 165 171 172 166 175 176 169 179 180 173 186 187 178 188 189 183 192 193 184 215 218 198 217 220 209 224 225 232 233 234 236 239 242 237 240 243 244 263 265 245 269 274 246 270 275...
result:
ok count=5000
Test #143:
score: 0
Accepted
time: 37ms
memory: 15008kb
input:
600000 3 2 1 3 1 1 2 3 1 1 2 1 2 2 1 1 2 1 1 2 2 2 1 2 3 3 2 2 1 2 3 1 2 1 2 2 3 2 2 1 3 1 2 2 3 1 2 1 2 3 1 2 1 1 2 3 2 2 2 1 2 3 3 1 2 1 3 2 3 1 3 2 1 2 3 2 1 1 3 1 2 3 2 1 2 3 1 3 2 1 1 1 2 2 1 1 1 2 1 3 2 2 2 3 2 2 2 3 1 2 1 3 2 3 3 2 3 1 1 3 3 3 1 1 3 1 1 1 1 1 2 1 3 2 2 3 1 2 1 1 1 2 2 1 2 2 2...
output:
200000 519 560 663 520 561 665 523 563 666 524 566 674 528 567 676 533 574 679 535 576 682 536 577 686 539 578 689 542 585 695 546 589 697 553 591 700 564 594 718 565 595 721 568 597 722 569 599 726 570 610 728 572 618 729 575 627 740 579 630 744 580 632 752 582 634 758 587 636 761 588 639 765 592 6...
result:
ok count=200000
Test #144:
score: 0
Accepted
time: 58ms
memory: 16396kb
input:
600000 1 1 3 3 1 1 3 1 3 1 3 3 1 3 3 1 3 3 1 3 1 3 3 3 3 1 3 1 3 3 1 1 1 1 3 1 1 3 3 1 3 1 1 1 3 3 3 3 1 3 1 3 1 3 3 1 1 3 3 3 3 3 1 1 1 1 3 1 1 3 3 3 3 1 1 1 3 1 3 3 1 1 3 1 3 1 1 3 1 1 3 3 3 3 1 1 3 3 1 1 3 3 1 1 1 1 3 3 3 1 1 1 1 1 3 1 1 3 1 1 3 1 1 3 1 3 1 3 3 1 3 3 1 1 1 1 3 1 3 3 3 3 1 3 3 1 1...
output:
200000 102785 166475 303001 102786 166476 303002 102788 166479 303005 102118 166480 303006 102119 166481 303007 102120 166482 303008 102124 166483 303009 102791 166484 303010 102792 166485 303011 102794 166486 303012 102795 166487 303013 102125 166488 303014 102126 166489 303015 102797 166490 303016...
result:
ok count=200000
Test #145:
score: 0
Accepted
time: 59ms
memory: 16900kb
input:
600000 3 1 3 3 3 1 1 1 1 3 3 1 3 1 3 1 1 3 3 3 1 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 1 3 3 1 1 3 1 1 1 1 1 3 3 1 1 1 3 1 3 3 3 1 1 3 3 1 3 1 1 3 3 1 3 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 1 1 3 3 1 1 3 1 3 1 1 3 3 1 1 1 3 1 1 1 3 1 1 3 3 3 3 1 1 1 1 1 3 3 1 3 3 1 1 1 1 1 3 1 3 3 1 1 3 1 3 1...
output:
200000 187835 201545 277081 187836 201546 277082 187837 201547 277083 187838 201548 277084 187839 201549 277085 187840 201550 277086 57948 63385 277089 187842 201551 277090 187846 201552 277091 57950 63386 277092 187847 201553 277093 57953 63387 277094 57959 63388 277095 187849 201554 277096 187850 ...
result:
ok count=200000
Test #146:
score: 0
Accepted
time: 58ms
memory: 17084kb
input:
600000 1 3 3 3 1 3 1 3 1 1 3 1 3 1 3 3 3 1 1 1 3 1 1 1 3 1 3 3 3 1 3 3 3 3 3 3 1 1 1 3 3 3 1 1 3 3 3 3 3 1 3 3 3 3 1 3 3 3 3 1 1 1 1 1 3 3 3 3 1 1 1 3 3 1 1 1 3 1 1 1 1 3 3 3 3 3 1 3 3 3 1 3 1 3 3 1 1 3 3 3 1 1 3 1 3 3 1 1 1 3 3 1 1 1 1 3 1 3 1 1 1 3 1 3 3 3 1 3 3 1 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 3 3...
output:
200000 111751 168307 285882 36528 44029 285884 111756 168308 285885 111759 168309 285886 36529 44030 285887 111762 168310 285888 36530 44031 285889 111763 168311 285890 111764 168312 285891 36531 44032 285892 111765 168313 285893 111768 168314 285894 36532 44033 285895 36533 44034 285896 111769 1683...
result:
ok count=200000
Test #147:
score: 0
Accepted
time: 3ms
memory: 6744kb
input:
60000 1 1 1 3 3 1 3 3 1 1 1 3 1 3 1 3 1 3 1 1 1 1 3 3 1 1 1 3 1 1 3 1 1 3 3 1 3 3 3 1 1 1 3 1 1 3 1 1 1 3 3 3 3 3 1 3 3 1 1 1 1 1 1 3 3 1 1 1 3 1 1 3 1 1 1 3 3 3 3 1 1 1 1 1 3 3 3 1 3 3 1 3 3 1 3 1 3 3 1 1 3 1 3 1 3 1 3 1 3 3 3 3 3 3 1 1 3 3 3 1 1 1 1 1 1 1 3 3 3 3 1 1 3 3 3 3 3 3 3 1 1 1 3 3 3 3 1 ...
output:
20000 11536 13228 14924 1005 3819 14925 11537 13229 14926 11538 13230 14927 11539 13231 14928 11541 13232 14929 11545 13233 14930 1006 3820 14931 11549 13234 14932 1010 3821 14933 11550 13235 14934 11554 13236 14935 1014 3822 14936 11555 13237 14937 11556 13238 14938 11557 13239 14939 11564 13240 14...
result:
ok count=20000
Test #148:
score: 0
Accepted
time: 5ms
memory: 6896kb
input:
90000 3 1 1 3 3 1 3 3 3 3 3 3 1 1 3 3 1 1 1 3 3 1 3 1 1 1 3 3 3 3 3 1 1 1 1 1 1 1 3 3 3 1 1 3 3 3 1 1 1 3 3 1 3 1 1 1 3 1 1 3 3 3 1 1 1 1 3 3 3 3 1 1 1 1 1 1 1 3 3 3 3 3 3 1 1 1 3 1 1 3 3 1 1 3 3 1 1 3 3 1 1 3 3 1 1 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 3 3 1 3 1 3 1 3 1 3 1 3 1 3 3 3 1 1 3 3 3 3 1 3 3 1 ...
output:
30000 1816 2312 3134 1250 1283 3135 1818 2313 3136 1819 2314 3137 1255 1284 3138 1824 2315 3139 1258 1285 3140 1825 2316 3141 1286 1287 3142 1827 2317 3143 137 472 3144 138 475 3145 143 479 3146 146 480 3147 1828 2318 3148 1829 2319 3149 1831 2320 3150 1834 2321 3151 1835 2322 3152 147 483 3153 1836...
result:
ok count=30000
Test #149:
score: 0
Accepted
time: 8ms
memory: 9628kb
input:
120000 3 3 1 3 3 3 3 3 3 1 3 1 1 3 1 1 1 3 1 3 3 3 3 3 1 1 1 1 1 1 1 3 3 1 3 3 3 1 1 1 3 3 1 1 1 3 1 1 3 1 1 3 3 1 3 1 1 1 1 1 1 3 1 3 1 3 1 1 3 1 3 3 3 3 1 1 1 1 3 3 3 3 3 3 3 3 1 1 3 1 1 1 3 1 3 3 1 1 1 3 1 3 3 3 3 3 3 3 3 3 1 3 3 1 3 3 1 1 3 3 1 1 3 3 1 1 1 3 1 3 3 3 3 1 1 3 1 3 3 1 1 1 1 3 1 3 1...
output:
40000 4399 6152 45704 27389 31173 45705 27394 31174 45706 27397 31175 45707 27400 31176 45708 27401 31177 45709 27402 31178 45710 4401 6154 45711 4403 6155 45712 4404 6156 45713 27406 31179 45714 27407 31180 45715 27410 31181 45716 4406 6157 45717 27411 31182 45718 27412 31183 45719 4407 6158 45720 ...
result:
ok count=40000
Test #150:
score: 0
Accepted
time: 15ms
memory: 8272kb
input:
150000 3 3 3 3 1 3 3 1 1 1 3 3 3 1 3 3 1 3 3 3 3 1 3 3 3 1 3 3 3 1 3 1 3 1 1 3 3 1 1 3 1 3 1 3 1 3 3 1 1 1 1 1 1 3 1 1 3 3 1 3 1 3 3 3 3 3 3 1 3 3 3 3 3 1 3 3 1 1 3 3 3 3 3 1 3 1 1 1 1 1 3 1 3 1 1 1 1 1 3 1 3 3 1 1 3 1 3 1 1 3 1 3 3 1 1 3 1 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 1 1 2 1 1 1 3 3 1 1 3 1 1 3 1...
output:
50000 62166 70898 90560 11951 13237 90562 62167 70899 90563 62171 70900 90564 11952 13238 90565 11954 13239 90566 11956 13240 90567 62174 70901 90568 62175 70902 90569 62177 70903 90570 11958 13241 90571 11961 13242 90572 62178 70904 90573 11963 13243 90574 62180 70905 90575 11965 13244 90576 62183 ...
result:
ok count=50000
Test #151:
score: 0
Accepted
time: 7ms
memory: 9616kb
input:
150000 1 1 1 1 3 1 3 3 1 1 1 1 1 1 3 3 1 3 1 1 1 3 1 3 3 3 3 3 3 3 1 3 1 3 1 1 1 3 1 1 3 3 3 3 3 1 1 1 1 3 3 1 3 1 1 3 3 1 1 1 3 3 1 3 3 3 3 1 3 3 1 1 3 3 1 1 3 1 3 3 1 1 1 3 3 1 3 1 1 1 3 3 3 1 1 1 1 3 3 1 3 3 3 3 1 1 1 3 1 1 1 3 1 1 1 1 1 3 1 3 1 1 1 3 3 1 3 3 1 3 3 1 3 3 3 3 1 3 3 3 3 1 3 3 3 3 1...
output:
50000 3958 10401 33948 19435 20577 33950 3960 10402 33951 3962 10403 33952 19438 20578 33953 3963 10404 33954 3964 10405 33955 3965 10409 33956 3967 10411 33957 19442 20579 33958 19443 20580 33959 3968 10412 33960 3969 10413 33961 19445 20581 33962 19447 20582 33963 19449 20583 33964 19450 20584 339...
result:
ok count=50000
Test #152:
score: 0
Accepted
time: 15ms
memory: 9488kb
input:
150000 1 3 3 3 3 3 3 1 1 1 3 1 1 1 1 3 1 1 1 3 1 1 1 3 3 3 1 1 1 3 1 3 1 1 1 1 3 1 3 1 3 1 1 1 3 3 1 1 1 3 3 1 1 1 3 3 3 1 3 3 3 1 3 3 1 3 1 3 3 3 3 1 1 3 3 1 1 1 3 3 3 3 1 3 1 1 3 1 3 3 1 3 3 1 3 1 1 1 1 3 3 1 1 1 3 3 1 1 1 1 3 1 3 3 3 3 1 3 1 1 1 3 1 3 1 1 1 3 3 1 1 1 1 3 1 3 1 3 1 1 3 1 1 1 3 1 1...
output:
50000 28929 35042 83092 28933 35043 83093 28934 35044 83095 28935 35045 83097 28937 35046 83098 28938 35047 83099 14058 20880 83101 14059 20881 83102 14062 20882 83103 28941 35048 83104 14069 20883 83105 28942 35049 83106 28943 35050 83107 28944 35051 83108 28945 35052 83109 28946 35053 83110 14079 ...
result:
ok count=50000
Test #153:
score: 0
Accepted
time: 79ms
memory: 21264kb
input:
600000 2 2 2 3 2 1 1 3 2 2 2 3 3 1 2 2 2 2 2 3 2 2 2 3 1 1 3 2 2 2 3 1 2 2 2 2 2 1 2 2 1 1 2 2 2 2 2 3 2 3 2 1 1 2 2 1 2 2 2 2 3 2 1 2 2 3 2 2 2 1 2 2 3 2 2 1 1 2 2 1 2 1 2 1 2 2 2 1 3 3 3 1 2 2 2 2 2 2 2 3 2 2 3 2 2 1 2 2 2 2 2 2 2 1 2 2 2 1 2 3 2 2 2 2 3 2 2 2 2 2 1 2 2 1 2 2 2 3 2 1 2 1 2 2 3 1 2...
output:
133513 128989 128990 200000 129000 129001 200001 129002 129003 200002 129005 129006 200003 15047 15051 200004 15048 15052 200005 15049 15053 200006 15056 15058 200007 15057 15059 200008 15062 15063 200009 15072 15077 200010 129020 129022 200011 129021 129024 200012 129023 129025 200013 15081 15083 2...
result:
ok count=133513
Test #154:
score: 0
Accepted
time: 70ms
memory: 21344kb
input:
600000 2 2 2 2 3 1 2 3 2 2 2 1 1 2 2 2 2 2 2 2 2 1 3 2 3 1 3 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 3 1 2 1 2 2 2 3 2 2 2 1 1 3 2 3 3 3 3 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 1 3 3 2 2 3 2 2 3 2 2 3 2 2 2 2 2 3 2 2 2 1 1 2 2 2 2 3 2 1 2 1 2 2 2 1 2 2 2 2 1 2 2 2 1 1 2 2 2 2 2 1 2 2 2 2 1 1 3 2 2 2 2 2 3 2 3 3...
output:
133361 16766 16767 200000 16769 16771 200001 16770 16772 200002 165544 165546 200003 165545 165547 200004 165548 165549 200005 165557 165558 200006 16781 16795 200007 165572 165575 200008 16782 16803 200009 165588 165589 200010 165591 165592 200011 16791 16804 200012 165598 165602 200013 16792 16805...
result:
ok count=133361
Test #155:
score: 0
Accepted
time: 79ms
memory: 21252kb
input:
600000 2 2 2 2 3 2 2 3 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 2 1 2 2 1 2 3 2 2 3 3 2 2 2 2 2 2 2 1 3 2 3 3 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 3 2 3 3 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 3 2 1 2 2 2 1 3 2 2 1 2 1 2 1 2 2 2 2 3 2 2 2 2 2 2 1 2 2 2 1 2 2 2 1 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 3 1 1...
output:
133217 199495 199500 200000 199496 199501 200001 297 298 200002 313 314 200003 322 326 200004 199497 199502 200005 199499 199503 200006 27 29 200007 76 77 200008 199507 199508 200009 78 79 200010 904 905 200011 91 92 200012 1408 1409 200013 199510 199511 200014 199514 199515 200015 95 97 200016 99 1...
result:
ok count=133217
Test #156:
score: 0
Accepted
time: 73ms
memory: 20940kb
input:
600000 2 2 2 2 2 2 3 3 2 2 3 3 3 1 2 2 1 2 2 2 2 2 2 2 2 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 1 2 2 2 2 2 2 2 2 2 2 2 1 2 3 2 2 2 2 3 1 3 2 3 2 1 1 2 2 2 1 2 2 2 2 2 3 2 2 2 2 1 2 2 2 2 3 2 1 2 2 3 2 3 2 2 2 2 3 2 3 2 2 2 2 2 2 1 3 2 2 2 2 1 2 2 2 3 1 3 2 2 1 1 2 1 2 2 2 1 1 2 3 1 3 3 2 2 1 2 3 1...
output:
133621 5989 5990 200000 5997 5999 200001 147210 147211 200002 5998 6001 200003 6000 6010 200004 6014 6015 200005 147212 147213 200006 147214 147215 200007 147221 147222 200008 147226 147227 200009 147233 147238 200010 6025 6026 200011 147246 147247 200012 147272 147273 200013 147281 147282 200014 60...
result:
ok count=133621
Test #157:
score: 0
Accepted
time: 57ms
memory: 18268kb
input:
470000 2 2 1 3 2 1 1 2 3 3 2 2 2 2 3 2 2 3 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 2 2 3 2 2 3 2 2 2 2 2 2 2 2 3 2 2 2 2 3 2 2 2 1 2 3 2 3 3 3 2 3 2 2 2 2 3 1 2 3 2 1 1 2 2 2 2 2 2 3 3 2 1 2 1 2 2 2 3 2 2 2 2 3 2 2 3 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 2 2 3 1 3 2 2 2 2 2 1 3 2 2 1 2 2 2 2 2 2 2 2 1 3...
output:
104516 146092 146094 156665 146096 146097 156666 146109 146110 156667 6309 6310 156668 146116 146122 156669 6316 6317 156670 146117 146123 156671 146118 146125 156672 146120 146128 156673 6321 6323 156674 146126 146130 156675 6327 6328 156676 146129 146134 156677 146131 146135 156678 146154 146155 1...
result:
ok count=104516
Test #158:
score: 0
Accepted
time: 60ms
memory: 19052kb
input:
470000 2 2 2 2 2 3 1 2 2 2 2 2 2 2 2 2 1 1 3 2 1 3 2 2 2 2 2 3 2 3 1 3 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 3 2 2 2 2 2 1 1 2 1 2 2 1 3 2 2 2 3 3 2 2 2 2 2 2 2 2 3 2 2 3 2 2 1 2 2 2 2 2 1 2 2 3 2 1 1 2 3 3 2 2 3 2 3 2 2 2 3 1 3 1 2 2 2 2 2 2 1 2 2 2 3 2 2 3 2 2 2 2 1 3 3 2 1 2 1 2 3 2 1 1 3 3 2 3 2 2 2 2 1...
output:
104147 6522 6525 156666 149349 149350 156667 149351 149352 156668 149363 149365 156669 149364 149366 156670 6529 6530 156671 6531 6532 156672 6541 6542 156673 6550 6552 156674 149373 149374 156675 6555 6556 156676 149376 149377 156677 149379 149380 156678 6560 6561 156679 6564 6567 156680 149387 149...
result:
ok count=104147
Test #159:
score: 0
Accepted
time: 61ms
memory: 18136kb
input:
470000 2 2 2 1 1 3 2 1 2 2 2 2 1 3 2 3 3 2 2 2 2 2 2 2 3 2 2 2 2 3 3 2 2 3 3 3 2 1 2 2 2 2 2 2 1 3 2 2 1 3 1 1 1 2 2 2 2 2 2 1 2 3 2 2 1 2 2 2 2 2 2 3 1 3 3 3 2 1 2 2 3 2 2 1 1 2 1 3 3 2 2 2 2 2 2 1 2 3 2 1 3 1 2 2 2 2 2 2 3 2 3 2 1 3 2 3 2 3 3 1 2 2 2 2 1 1 2 3 2 2 3 2 2 2 1 2 2 3 2 2 2 2 2 1 1 2 2...
output:
104570 80 92 156666 4056 4066 156667 66262 66263 156668 87 93 156669 66270 66273 156670 88 94 156671 66280 66281 156672 4058 4067 156673 4062 4068 156674 66290 66293 156675 66291 66296 156676 4064 4069 156677 66301 66302 156678 66312 66313 156679 66315 66316 156680 4077 4083 156681 66317 66318 15668...
result:
ok count=104570
Test #160:
score: 0
Accepted
time: 54ms
memory: 18664kb
input:
469999 2 2 2 2 2 2 2 1 3 3 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 1 2 1 2 2 3 2 2 1 3 2 2 2 2 2 3 2 2 2 2 1 1 2 2 1 2 2 1 2 2 2 2 2 1 1 2 2 2 2 2 3 2 2 2 2 1 2 1 2 2 2 3 1 2 3 2 2 1 2 2 2 1 2 3 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 3 2 2 2 2 2 2 2 2 1 2 2 2 2 2 3 2 2 2 2 2 2 2 1 2 2 1 3 3 3 2 3 2 2 2 1 2 3 1 1 3 2 1...
output:
103891 2104 2105 156666 156290 156291 156667 156293 156295 156668 156300 156302 156669 1263 1264 156670 1268 1269 156671 156318 156319 156672 1270 1271 156673 1278 1281 156674 2655 2657 156675 1287 1288 156676 1293 1294 156677 156321 156322 156678 2146 2153 156679 1298 1299 156680 1307 1309 156681 1...
result:
ok count=103891
Test #161:
score: 0
Accepted
time: 6ms
memory: 17840kb
input:
600000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
1 0 120192 386125
result:
ok count=1
Test #162:
score: 0
Accepted
time: 26ms
memory: 14848kb
input:
149980 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 77404 77405 96783
result:
ok count=1
Test #163:
score: 0
Accepted
time: 24ms
memory: 14468kb
input:
600000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
200000 0 200000 400000 1 200001 400001 2 200002 400002 3 200003 400003 4 200004 400004 5 200005 400005 6 200006 400006 7 200007 400007 8 200008 400008 9 200009 400009 10 200010 400010 11 200011 400011 12 200012 400012 13 200013 400013 14 200014 400014 15 200015 400015 16 200016 400016 17 200017 4000...
result:
ok count=200000
Test #164:
score: 0
Accepted
time: 119ms
memory: 37512kb
input:
600000 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
1 0 1 599998
result:
ok count=1
Test #165:
score: 0
Accepted
time: 20ms
memory: 15232kb
input:
600000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
120000 0 240000 360000 1 240001 360001 2 240002 360002 3 240003 360003 4 240004 360004 5 240005 360005 6 240006 360006 7 240007 360007 8 240008 360008 9 240009 360009 10 240010 360010 11 240011 360011 12 240012 360012 13 240013 360013 14 240014 360014 15 240015 360015 16 240016 360016 17 240017 3600...
result:
ok count=120000
Test #166:
score: 0
Accepted
time: 1ms
memory: 5756kb
input:
6 1 2 3 2 3 1
output:
2 0 1 4 2 3 5
result:
ok count=2
Test #167:
score: 0
Accepted
time: 33ms
memory: 14684kb
input:
599700 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
197700 0 197700 397600 1 197701 397601 2 197702 397602 3 197703 397603 4 197704 397604 5 197705 397605 6 197706 397606 7 197707 397607 8 197708 397608 9 197709 397609 10 197710 397610 11 197711 397611 12 197712 397612 13 197713 397613 14 197714 397614 15 197715 397615 16 197716 397616 17 197717 3976...
result:
ok count=197700