QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#323724 | #3560. Stray Cat | bachbeo2007 | 100 ✓ | 38ms | 12944kb | C++20 | 1.6kb | 2024-02-10 12:35:14 | 2024-02-10 12:35:15 |
Judging History
Anthony
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
namespace {
int c[]={0,1,0,0,1,1};
}
vector<int> Mark(int N, int M, int A, int B,vector<int> U,vector<int> V) {
vector<int> X(M),dep(N,-1);
vector<vector<pii>> edge(N);
for(int i=0;i<M;i++) edge[U[i]].push_back({V[i],i}),edge[V[i]].push_back({U[i],i});
queue<pii> q;q.push({0,0});dep[0]=0;
while(!q.empty()){
auto [u,d]=q.front();q.pop();
for(auto [v,id]:edge[u]){
if(B){
if(dep[v]!=-1) continue;
int nd=((int)edge[v].size()==2?(d+1)%6:(c[d]^1));
q.push({v,dep[v]=nd});X[id]=c[d];
}
else if(dep[v]==-1) dep[v]=d+1,q.push({v,dep[v]});
}
}
if(!B) for(int i=0;i<M;i++) X[i]=min(dep[U[i]],dep[V[i]])%3;
return X;
}
Catherine
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int A,B,p=-1;
int up=0,st=0,num=0;
int f[81];
}
void Init(int _A, int _B) {
A=_A;B=_B;
f[39]=-1;f[43]=0;f[32]=-1;f[13]=1;
f[16]=-1;f[31]=0;f[67]=-1;f[64]=1;
}
int Move(vector<int> y) {
auto g = [&](int val){return p=(val==-1?p:val),val;};
if(A==2){
int d=y[0]+y[1]+(st!=0);st++;
if(up) return g(d>=3?(p^1):y[1]);
if(d==1) return up=true,g(st!=1?-1:y[1]);
if(d>2) return up=true,g(y[0]==0 || y[1]==0?-1:(y[1]+(p==1)>y[0]+(p==0)?0:1));
num=num*3+y[1]+(p==1);
if(st<4) return g(!y[0]);
else return up=true,g(f[num]);
}
else for(int i=0;i<3;i++) if(y[i] && !y[(i+2)%3]) return i;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 2
Accepted
Test #1:
score: 2
Accepted
time: 14ms
memory: 11792kb
input:
20000 19999 4 0 4854 4424 11648 889 16115 4439 10593 3858 14508 8499 19385 9478 12396 1012 13407 6863 11342 1896 15127 5622 9551 16073 18930 13539 17244 13057 19981 536 7153 15447 15948 11950 19557 1121 17461 10380 15722 16143 19800 10630 11823 3669 16972 3915 18147 3313 4569 2908 3474 4490 18883 54...
output:
0 0 0 1 2 0 2 1 2 2 2 1 2 1 0 2 2 1 1 2 1 2 1 2 2 2 1 0 0 1 1 2 1 2 0 0 0 2 2 2 0 0 1 1 0 0 1 2 0 1 1 1 1 1 1 2 2 0 1 1 1 1 2 1 1 0 0 0 2 2 0 1 0 1 0 0 1 0 2 0 0 2 1 2 1 1 0 0 1 2 0 1 2 1 2 0 0 2 2 2 1 1 1 0 1 0 1 1 1 0 0 0 1 0 1 1 2 0 0 2 2 1 0 0 1 1 1 1 2 0 2 2 0 2 1 1 0 1 2 0 1 2 2 0 2 1 0 2 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 5100
result:
ok Number of moves = 5100
Test #2:
score: 2
Accepted
time: 0ms
memory: 3808kb
input:
2 1 4 0 1 0 1
output:
0
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #3:
score: 2
Accepted
time: 8ms
memory: 11672kb
input:
20000 19999 4 0 12741 0 8045 10830 12741 11047 12741 7734 12741 10496 12741 0 19310 12741 15324 12741 15111 0 16665 12741 19940 0 7345 0 8973 0 12965 1856 12741 0 9366 0 16761 3689 12741 3262 12741 0 14953 10685 12741 0 8939 7504 12741 8497 12741 0 7105 6021 12741 0 10213 12741 17648 11043 12741 127...
output:
0 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #4:
score: 2
Accepted
time: 32ms
memory: 12944kb
input:
20000 19999 4 0 13682 14008 14375 12989 15355 11902 12963 11478 15501 1504 2026 9127 18518 1497 7374 10678 12718 8520 12575 6716 13047 5388 14856 13722 18494 1950 13535 5607 12005 14758 18493 1227 19659 7519 15113 795 10727 10032 11445 1219 2439 3316 15163 13150 14939 7328 11534 17496 19036 7970 115...
output:
2 2 1 0 1 2 1 2 1 1 1 1 0 0 1 2 1 1 1 1 2 0 2 0 1 2 1 2 0 0 2 0 2 1 1 1 0 1 1 1 1 1 1 0 0 2 0 2 1 2 1 2 2 0 0 1 0 0 0 2 2 2 0 2 1 0 1 0 2 0 2 0 2 0 1 0 2 0 2 1 1 1 0 0 2 2 1 1 2 2 0 0 1 2 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 2 0 2 2 0 2 2 0 2 1 0 2 0 2 2 2 1 2 2 0 0 0 1 2 0 0 1 0 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19999
result:
ok Number of moves = 19999
Test #5:
score: 2
Accepted
time: 36ms
memory: 12896kb
input:
20000 19999 4 0 3481 5711 8937 3753 19017 5157 14683 3445 12544 15536 17773 12298 16110 3658 10260 3390 19125 8235 19809 3181 3860 6693 11189 14139 15899 17033 17584 1760 5212 4173 11952 16252 18681 11928 19038 6295 9977 7235 13107 1305 18192 15834 16164 13263 19938 7378 10689 7424 13794 7385 10183 ...
output:
0 0 2 1 2 2 0 0 0 1 0 2 0 0 0 0 0 2 2 1 0 2 0 1 2 1 2 1 1 1 2 1 0 0 0 2 2 0 2 0 0 2 2 1 1 0 1 1 2 0 1 2 2 2 0 0 0 0 1 1 1 0 2 1 1 0 1 2 1 1 0 1 1 2 1 2 1 2 0 0 0 2 1 2 2 2 0 2 0 2 0 0 1 1 1 1 1 1 1 2 2 1 1 0 1 2 2 0 0 0 1 1 0 1 0 2 2 2 2 2 2 0 1 2 2 2 0 0 0 2 1 2 1 1 1 2 2 2 1 0 2 2 2 1 2 2 1 1 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 19998
result:
ok Number of moves = 19998
Test #6:
score: 2
Accepted
time: 20ms
memory: 11812kb
input:
20000 19999 4 0 17749 4560 5540 6063 14791 9782 15051 3499 16344 5069 12857 15481 18881 2769 10534 4926 15405 3205 5009 2726 6821 5023 14366 5231 7318 9839 14776 1161 8871 12125 12912 6416 7685 11665 17025 10516 17085 1083 11585 1769 18004 915 6569 7199 11381 11017 17458 7260 12345 11635 17303 3903 ...
output:
2 2 1 0 0 1 2 0 1 2 1 1 2 0 1 0 0 2 2 1 0 2 1 2 0 0 1 1 2 1 0 0 1 1 0 0 0 1 2 2 1 0 2 1 1 2 2 0 1 0 1 1 0 1 1 1 0 0 1 1 2 2 2 0 0 2 1 0 1 0 1 1 0 1 2 0 0 1 1 1 0 0 2 1 2 2 0 0 1 2 2 1 1 2 1 0 0 0 1 1 0 2 0 2 1 1 1 2 1 1 1 2 1 2 1 0 0 0 1 0 1 2 2 1 0 2 1 2 1 0 1 2 1 2 2 1 1 0 1 1 0 1 2 2 1 2 2 2 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 2151
result:
ok Number of moves = 2151
Test #7:
score: 2
Accepted
time: 12ms
memory: 11888kb
input:
20000 19999 4 0 5815 4560 5540 6063 14791 9782 15051 3499 16344 5069 12857 15481 18881 2769 10534 4926 15405 3205 5009 2726 6821 5023 14366 5231 7318 9839 14776 1161 8871 12125 12912 6416 7685 11665 17025 10516 17085 1083 11585 1769 18004 915 6569 7199 11381 11017 17458 7260 12345 11635 17303 3903 1...
output:
2 2 1 0 0 1 2 0 1 2 1 1 2 0 1 0 0 2 2 1 0 2 1 2 0 0 1 1 2 1 0 0 1 1 0 0 0 1 2 2 1 0 2 1 1 2 2 0 1 0 1 1 0 1 1 1 0 0 1 1 2 2 2 0 0 2 1 0 1 0 1 1 0 1 2 0 0 1 1 1 0 0 2 1 2 2 0 0 1 2 2 1 1 2 1 0 0 0 1 1 0 2 0 2 1 1 1 2 1 1 1 2 1 2 1 0 0 0 1 0 1 2 2 1 0 2 1 2 1 0 1 2 1 2 2 1 1 0 1 1 0 1 2 2 1 2 2 2 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 2252
result:
ok Number of moves = 2252
Test #8:
score: 2
Accepted
time: 22ms
memory: 12420kb
input:
20000 19999 4 0 18199 1930 17301 9815 11509 5680 12498 5444 15877 12174 12697 11440 12005 10202 15023 4522 5384 8383 8752 5355 10816 3061 8434 6803 16128 2793 4232 15277 15360 9821 12463 5108 7146 4844 17890 16318 17908 6280 6331 6632 14259 3109 8883 5307 19423 7242 16555 12206 19332 7198 19076 6534...
output:
1 2 0 0 1 0 0 2 1 2 1 0 0 0 2 0 2 1 0 1 0 1 0 0 1 2 1 1 1 0 2 0 1 0 2 1 2 0 0 0 0 2 2 0 0 0 2 2 2 1 2 2 1 1 1 1 2 0 2 0 0 1 1 2 0 2 2 0 0 1 0 0 2 1 0 0 2 0 1 0 1 1 0 0 2 2 0 2 1 1 0 2 0 0 0 1 0 2 0 0 0 0 2 1 2 2 0 2 2 2 0 2 2 1 0 0 1 2 1 0 1 0 1 2 2 1 1 2 1 2 1 2 0 2 1 1 0 1 1 1 2 0 0 2 1 1 2 1 2 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13242
result:
ok Number of moves = 13242
Test #9:
score: 2
Accepted
time: 30ms
memory: 12340kb
input:
20000 19999 4 0 717 1930 17301 9815 11509 5680 12498 5444 15877 12174 12697 11440 12005 10202 15023 4522 5384 8383 8752 5355 10816 3061 8434 6803 16128 2793 4232 15277 15360 9821 12463 5108 7146 4844 17890 16318 17908 6280 6331 6632 14259 3109 8883 5307 19423 7242 16555 12206 19332 7198 19076 6534 1...
output:
1 2 0 0 1 0 0 2 1 2 1 0 0 0 2 0 2 1 0 1 0 1 0 0 1 2 1 1 1 0 2 0 1 0 2 1 2 0 0 0 0 2 2 0 0 0 2 2 2 1 2 2 1 1 1 1 2 0 2 0 0 1 1 2 0 2 2 0 0 1 0 0 2 1 0 0 2 0 1 0 1 1 0 0 2 2 0 2 1 1 0 2 0 0 0 1 0 2 0 0 0 0 2 1 2 2 0 2 2 2 0 2 2 1 0 0 1 2 1 0 1 0 1 2 2 1 1 2 1 2 1 2 0 2 1 1 0 1 1 1 2 0 0 2 1 1 2 1 2 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13243
result:
ok Number of moves = 13243
Subtask #2:
score: 2
Accepted
Test #10:
score: 2
Accepted
time: 24ms
memory: 10572kb
input:
17000 20000 4 0 12619 13144 15055 4989 15711 2356 5009 1727 16587 9362 10329 7811 10259 10193 11416 6111 15167 280 1169 7504 13721 5629 6802 2309 16712 1416 10913 2896 8725 6181 16997 648 7448 6744 12886 7179 13832 14616 15715 5540 15126 4268 8744 9841 13672 5292 5475 12312 14802 8118 8670 2290 1444...
output:
2 2 1 2 0 0 2 0 1 1 0 1 1 0 0 2 2 0 0 0 0 1 2 1 0 2 1 0 0 0 1 2 0 2 2 1 1 1 2 2 2 2 2 2 2 0 1 0 1 1 0 2 2 2 0 0 0 1 0 1 1 1 0 0 1 0 0 2 0 1 0 1 2 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 2 1 0 1 1 0 1 0 0 0 1 1 1 2 0 1 1 2 1 1 0 0 1 1 0 1 0 1 0 0 2 2 2 0 0 1 0 0 2 0 1 1 1 0 1 1 1 0 2 1 1 0 2 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 10
result:
ok Number of moves = 10
Test #11:
score: 2
Accepted
time: 16ms
memory: 10500kb
input:
17000 20000 4 0 9756 13144 15055 4989 15711 2356 5009 1727 16587 9362 10329 7811 10259 10193 11416 6111 15167 280 1169 7504 13721 5629 6802 2309 16712 1416 10913 2896 8725 6181 16997 648 7448 6744 12886 7179 13832 14616 15715 5540 15126 4268 8744 9841 13672 5292 5475 12312 14802 8118 8670 2290 14446...
output:
2 2 1 2 0 0 2 0 1 1 0 1 1 0 0 2 2 0 0 0 0 1 2 1 0 2 1 0 0 0 1 2 0 2 2 1 1 1 2 2 2 2 2 2 2 0 1 0 1 1 0 2 2 2 0 0 0 1 0 1 1 1 0 0 1 0 0 2 0 1 0 1 2 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 2 1 0 1 1 0 1 0 0 0 1 1 1 2 0 1 1 2 1 1 0 0 1 1 0 1 0 1 0 0 2 2 2 0 0 1 0 0 2 0 1 1 1 0 1 1 1 0 2 1 1 0 2 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 10
result:
ok Number of moves = 10
Test #12:
score: 2
Accepted
time: 16ms
memory: 10572kb
input:
17000 20000 4 0 3817 6191 14877 3081 9583 469 1711 4511 4566 9403 16559 1567 15933 8984 14488 13492 14188 3350 16312 1759 6316 1338 3324 215 6388 12145 14280 2180 16892 1673 13474 2562 11409 1338 15210 2319 8986 3448 11485 5052 7284 7014 14599 3388 7521 6165 15484 7036 8495 3251 8318 13782 15941 147...
output:
1 2 1 2 1 2 1 1 1 0 0 0 2 0 1 2 0 1 0 1 2 1 0 2 1 2 2 2 1 2 2 2 0 2 1 1 0 0 2 0 2 1 1 0 0 1 2 2 0 2 0 0 0 0 1 0 2 0 0 1 1 1 0 2 2 0 2 0 0 1 0 2 2 2 2 2 0 0 0 0 0 1 0 1 0 2 0 2 1 2 0 0 1 1 0 0 2 1 0 0 1 2 0 0 2 1 0 2 0 1 2 0 1 1 2 0 2 2 0 0 2 1 1 0 2 1 1 2 0 1 0 1 2 0 2 0 0 2 2 1 0 0 1 0 0 0 0 2 2 1 ...
input:
Interaction has been finished!
output:
Number of moves = 122
result:
ok Number of moves = 122
Test #13:
score: 2
Accepted
time: 8ms
memory: 10624kb
input:
17000 20000 4 0 5094 6191 14877 3081 9583 469 1711 4511 4566 9403 16559 1567 15933 8984 14488 13492 14188 3350 16312 1759 6316 1338 3324 215 6388 12145 14280 2180 16892 1673 13474 2562 11409 1338 15210 2319 8986 3448 11485 5052 7284 7014 14599 3388 7521 6165 15484 7036 8495 3251 8318 13782 15941 147...
output:
1 2 1 2 1 2 1 1 1 0 0 0 2 0 1 2 0 1 0 1 2 1 0 2 1 2 2 2 1 2 2 2 0 2 1 1 0 0 2 0 2 1 1 0 0 1 2 2 0 2 0 0 0 0 1 0 2 0 0 1 1 1 0 2 2 0 2 0 0 1 0 2 2 2 2 2 0 0 0 0 0 1 0 1 0 2 0 2 1 2 0 0 1 1 0 0 2 1 0 0 1 2 0 0 2 1 0 2 0 1 2 0 1 1 2 0 2 2 0 0 2 1 1 0 2 1 1 2 0 1 0 1 2 0 2 0 0 2 2 1 0 0 1 0 0 0 0 2 2 1 ...
input:
Interaction has been finished!
output:
Number of moves = 8
result:
ok Number of moves = 8
Test #14:
score: 2
Accepted
time: 12ms
memory: 10568kb
input:
17000 20000 4 0 13690 6406 9288 674 6677 3849 15396 1393 4328 11255 13874 7711 8113 591 9808 2110 16064 2655 10126 1472 4885 963 11977 236 13029 7018 8371 1592 5731 7151 10026 7647 9198 6663 11715 11808 14386 4184 9119 5978 14904 23 9649 7533 9524 2128 5456 6622 11701 36 9542 5949 11432 6226 6632 56...
output:
0 0 2 1 1 0 2 2 2 1 1 0 2 0 1 2 1 1 0 0 0 1 1 0 0 1 2 0 0 0 1 1 2 0 2 2 1 0 2 1 0 2 1 1 2 2 1 2 1 0 0 1 2 0 0 0 1 0 2 1 0 0 1 1 0 2 2 2 0 0 0 2 0 0 1 0 2 2 2 0 2 2 0 1 0 0 0 0 1 2 1 1 0 0 0 2 2 0 0 0 2 0 2 1 2 1 2 1 1 2 2 2 0 1 1 0 2 2 0 0 1 2 0 1 1 0 2 2 1 2 0 1 1 0 1 1 0 2 0 2 1 0 2 2 1 0 1 2 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 1059
result:
ok Number of moves = 1059
Test #15:
score: 2
Accepted
time: 20ms
memory: 11076kb
input:
17000 20000 4 0 11069 6406 9288 674 6677 3849 15396 1393 4328 11255 13874 7711 8113 591 9808 2110 16064 2655 10126 1472 4885 963 11977 236 13029 7018 8371 1592 5731 7151 10026 7647 9198 6663 11715 11808 14386 4184 9119 5978 14904 23 9649 7533 9524 2128 5456 6622 11701 36 9542 5949 11432 6226 6632 56...
output:
0 0 2 1 1 0 2 2 2 1 1 0 2 0 1 2 1 1 0 0 0 1 1 0 0 1 2 0 0 0 1 1 2 0 2 2 1 0 2 1 0 2 1 1 2 2 1 2 1 0 0 1 2 0 0 0 1 0 2 1 0 0 1 1 0 2 2 2 0 0 0 2 0 0 1 0 2 2 2 0 2 2 0 1 0 0 0 0 1 2 1 1 0 0 0 2 2 0 0 0 2 0 2 1 2 1 2 1 1 2 2 2 0 1 1 0 2 2 0 0 1 2 0 1 1 0 2 2 1 2 0 1 1 0 1 1 0 2 0 2 1 0 2 2 1 0 1 2 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 9307
result:
ok Number of moves = 9307
Test #16:
score: 2
Accepted
time: 28ms
memory: 12364kb
input:
20000 20000 4 0 8845 11288 16801 2126 4371 4720 14471 413 2714 186 4604 2352 4201 6986 12866 10872 19331 957 19085 5687 7193 12499 15595 12301 18292 2928 16938 6990 16439 5354 6261 4542 4655 1630 11240 2355 15603 7413 11528 2138 19136 6912 10696 3989 11484 2542 11318 16351 19754 3757 5878 7581 8369 ...
output:
2 0 1 1 1 2 2 1 0 0 0 0 2 1 1 1 2 1 0 0 2 0 1 2 0 1 2 2 0 1 2 1 2 2 1 1 1 0 2 1 1 2 0 0 1 2 0 2 1 0 2 1 0 1 1 0 1 1 2 2 2 0 1 1 1 2 1 0 1 1 1 1 0 2 0 2 2 0 1 1 0 0 2 2 2 0 0 1 1 1 0 0 0 1 1 2 0 0 1 0 2 0 1 1 1 2 0 2 1 2 2 1 1 1 1 1 0 2 1 2 2 0 0 0 2 1 0 2 1 2 0 1 1 0 2 0 0 0 1 1 2 1 0 0 2 2 0 2 2 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10000
result:
ok Number of moves = 10000
Subtask #3:
score: 2
Accepted
Test #17:
score: 2
Accepted
time: 0ms
memory: 10428kb
input:
20000 19999 3 0 19600 5632 15031 10854 19321 3093 5123 12611 17519 1474 14772 5370 18174 5202 17042 1990 5303 10137 14721 7120 16544 1810 12366 6907 16881 14575 18737 17365 17602 5780 8876 1518 8310 2276 19515 2269 9645 16762 18567 10684 17675 4576 6105 13666 18356 5635 15131 5436 7751 14955 19728 9...
output:
1 1 1 2 2 2 1 1 2 1 0 0 0 1 1 0 2 1 0 1 1 2 2 2 1 2 0 2 0 1 2 2 0 0 1 0 1 1 1 1 1 1 0 0 2 1 2 1 1 1 2 0 1 1 2 2 2 0 0 0 0 0 2 2 1 2 1 0 2 1 0 0 1 2 1 0 1 1 0 0 1 2 2 0 2 0 0 1 2 2 2 0 0 0 1 0 0 2 2 0 1 1 2 1 0 1 2 2 2 2 2 0 0 0 2 0 1 0 0 1 1 2 1 1 1 0 2 2 0 1 0 1 2 0 0 2 0 2 0 0 2 1 0 2 0 1 1 0 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 930
result:
ok Number of moves = 930
Test #18:
score: 2
Accepted
time: 0ms
memory: 4088kb
input:
2 1 3 0 1 0 1
output:
0
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #19:
score: 2
Accepted
time: 12ms
memory: 10124kb
input:
20000 19999 3 0 18532 9747 18532 17161 18532 0 8031 13170 18532 14624 18532 0 12186 0 10140 0 3667 15000 18532 0 15557 17764 18532 0 8725 0 18259 0 8060 3323 18532 0 14397 0 7077 18532 19240 0 1786 0 12769 0 4712 18532 18536 0 3389 6985 18532 0 11416 16455 18532 0 17241 8986 18532 11751 18532 0 5988...
output:
1 1 0 1 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #20:
score: 2
Accepted
time: 32ms
memory: 11360kb
input:
20000 19999 3 0 16798 7619 15574 8829 8833 13409 17464 6006 12194 5226 13736 11194 15579 5619 12450 39 7952 12975 15049 3564 14630 10790 16349 1054 14859 767 19472 1852 14305 511 19568 2904 11870 5955 8819 6703 8239 2793 4371 1939 13908 7112 18636 14924 19936 3825 16450 15846 17040 5788 14104 13775 ...
output:
0 2 0 1 0 0 2 2 1 1 0 2 2 0 0 0 1 0 0 2 2 1 2 2 1 1 0 2 1 1 2 2 0 1 0 1 2 2 2 0 1 2 0 2 2 0 2 2 2 1 1 1 1 1 1 1 1 2 1 0 1 0 0 1 0 2 0 1 1 1 2 2 1 1 2 2 2 2 0 2 0 1 1 1 0 1 2 2 1 2 2 2 0 1 0 1 1 2 0 0 2 1 1 0 1 0 2 2 0 2 0 2 1 2 0 2 0 0 0 2 1 1 1 0 2 0 0 0 2 1 2 1 0 0 0 0 1 0 2 1 1 0 1 2 0 1 0 2 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 19999
result:
ok Number of moves = 19999
Test #21:
score: 2
Accepted
time: 38ms
memory: 11308kb
input:
20000 19999 3 0 9522 822 9054 19145 19570 2259 5823 12892 19821 323 5977 7690 12849 10820 16683 8415 10732 13388 17773 5953 14245 7161 17152 13385 14411 7081 18663 2689 7736 3599 3953 8421 8710 1027 4408 1123 10996 1353 14489 11474 19177 12524 18725 1766 19281 4858 15539 9154 15643 1719 4929 10406 1...
output:
0 0 2 0 1 2 0 1 2 1 1 1 2 2 2 2 2 0 2 2 1 2 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 2 1 2 1 2 1 0 0 0 2 0 2 1 1 1 2 2 0 1 2 1 2 0 1 0 1 1 0 1 2 0 2 1 1 0 2 2 0 1 2 2 1 0 0 2 0 2 0 1 0 1 0 1 2 1 1 2 2 2 0 0 0 0 0 2 2 2 1 0 1 0 2 2 1 2 2 2 0 2 1 2 0 0 1 1 2 1 1 0 1 1 0 1 2 2 1 1 1 1 1 1 2 0 0 2 0 0 0 1 1 2 0 2 ...
input:
Interaction has been finished!
output:
Number of moves = 19998
result:
ok Number of moves = 19998
Test #22:
score: 2
Accepted
time: 24ms
memory: 10232kb
input:
20000 19999 3 0 13747 15598 18876 14575 15888 451 2762 1040 6216 4777 16339 9993 14616 6203 8329 3051 6645 10154 19561 5134 13052 1400 13532 4449 5373 918 1831 13032 14433 9532 13911 15151 18654 2877 5186 1104 8322 2847 18011 9505 14382 5758 14013 6826 8971 6779 13456 8748 12121 6895 12878 9621 1787...
output:
1 0 1 1 0 2 0 0 0 0 2 2 0 2 0 2 0 1 0 0 0 1 2 0 2 1 0 1 1 1 1 1 0 0 0 1 1 2 1 2 0 2 1 1 0 1 0 1 1 0 1 1 1 1 1 2 2 2 2 1 1 2 0 2 2 2 0 2 1 2 2 0 0 0 2 2 2 0 2 0 1 1 1 1 0 0 2 1 0 0 0 0 1 1 2 1 2 1 2 1 0 0 1 2 0 0 0 2 1 2 1 1 0 2 0 1 1 1 0 2 1 2 1 2 1 1 1 0 0 1 1 1 1 1 2 0 1 2 2 2 1 0 2 1 2 0 1 2 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 2120
result:
ok Number of moves = 2120
Test #23:
score: 2
Accepted
time: 8ms
memory: 10484kb
input:
20000 19999 3 0 2694 15598 18876 14575 15888 451 2762 1040 6216 4777 16339 9993 14616 6203 8329 3051 6645 10154 19561 5134 13052 1400 13532 4449 5373 918 1831 13032 14433 9532 13911 15151 18654 2877 5186 1104 8322 2847 18011 9505 14382 5758 14013 6826 8971 6779 13456 8748 12121 6895 12878 9621 17876...
output:
1 0 1 1 0 2 0 0 0 0 2 2 0 2 0 2 0 1 0 0 0 1 2 0 2 1 0 1 1 1 1 1 0 0 0 1 1 2 1 2 0 2 1 1 0 1 0 1 1 0 1 1 1 1 1 2 2 2 2 1 1 2 0 2 2 2 0 2 1 2 2 0 0 0 2 2 2 0 2 0 1 1 1 1 0 0 2 1 0 0 0 0 1 1 2 1 2 1 2 1 0 0 1 2 0 0 0 2 1 2 1 1 0 2 0 1 1 1 0 2 1 2 1 2 1 1 1 0 0 1 1 1 1 1 2 0 1 2 2 2 1 0 2 1 2 0 1 2 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 2221
result:
ok Number of moves = 2221
Test #24:
score: 2
Accepted
time: 30ms
memory: 10784kb
input:
20000 19999 3 0 13716 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 12242
result:
ok Number of moves = 12242
Test #25:
score: 2
Accepted
time: 24ms
memory: 11016kb
input:
20000 19999 3 0 13524 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 12243
result:
ok Number of moves = 12243
Test #26:
score: 2
Accepted
time: 22ms
memory: 10500kb
input:
20000 19999 3 0 1894 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235 ...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 6999
result:
ok Number of moves = 6999
Test #27:
score: 2
Accepted
time: 28ms
memory: 10564kb
input:
20000 19999 3 0 12128 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 7000
result:
ok Number of moves = 7000
Test #28:
score: 2
Accepted
time: 20ms
memory: 10564kb
input:
20000 19999 3 0 10792 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 7003
result:
ok Number of moves = 7003
Test #29:
score: 2
Accepted
time: 30ms
memory: 10568kb
input:
20000 19999 3 0 10624 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 7004
result:
ok Number of moves = 7004
Test #30:
score: 2
Accepted
time: 16ms
memory: 10832kb
input:
20000 19999 3 0 18856 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 12998
result:
ok Number of moves = 12998
Test #31:
score: 2
Accepted
time: 32ms
memory: 11016kb
input:
20000 19999 3 0 2257 2443 3550 7226 18881 6724 15050 6146 10096 5988 11062 11837 15312 10744 14005 853 15032 3080 3193 6667 8573 168 10247 16604 18852 16627 18967 6123 6872 8307 18440 9463 17753 12242 15674 5503 12554 9997 15180 4082 9001 11429 19103 7769 12141 13562 16968 4572 15700 254 16337 5235 ...
output:
2 2 1 1 0 2 2 0 0 0 0 1 1 2 2 1 1 0 1 0 0 1 2 1 2 0 2 2 1 0 1 1 1 0 0 1 0 1 2 2 0 2 0 2 2 2 1 1 1 2 2 0 0 1 2 0 1 2 0 2 2 2 2 1 1 0 1 2 2 1 2 0 0 2 2 1 2 0 1 1 0 0 2 0 0 2 0 0 2 0 1 1 1 0 2 0 2 2 1 2 1 0 2 2 0 2 2 2 1 0 0 1 1 0 1 0 1 1 0 2 1 0 1 2 2 2 2 2 2 1 1 2 0 0 0 1 1 2 1 2 0 0 1 0 2 0 2 1 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 12999
result:
ok Number of moves = 12999
Subtask #4:
score: 9
Accepted
Test #32:
score: 9
Accepted
time: 20ms
memory: 9216kb
input:
17000 20000 3 0 3252 2359 3001 415 5527 1475 15891 8317 15348 4310 7789 15 2479 2514 6838 4492 8286 484 15663 15092 16994 1733 14990 7480 8385 146 6178 723 16279 7172 9638 3167 4833 2140 15556 4588 14172 4827 10341 2227 8025 6236 8222 9308 15099 6500 11300 1531 12027 8714 15298 972 11828 13748 16847...
output:
0 2 2 2 0 2 0 0 0 0 2 0 2 0 2 2 2 2 0 2 2 2 2 2 0 0 0 2 2 0 0 0 2 0 0 0 2 2 2 0 2 2 2 2 0 2 0 0 2 2 2 0 2 2 2 2 2 2 2 2 2 2 0 2 2 0 0 2 2 2 2 2 2 2 2 0 2 0 2 2 0 0 2 2 0 2 2 2 0 0 2 0 2 0 2 0 1 2 2 2 2 2 2 2 2 2 2 0 2 2 2 0 2 2 0 0 0 2 2 0 2 2 2 0 2 2 2 0 2 2 2 2 0 2 0 0 2 0 0 2 2 0 2 2 1 0 2 2 2 0 ...
input:
Interaction has been finished!
output:
Number of moves = 3
result:
ok Number of moves = 3
Test #33:
score: 9
Accepted
time: 20ms
memory: 9184kb
input:
17000 20000 3 0 5322 2359 3001 415 5527 1475 15891 8317 15348 4310 7789 15 2479 2514 6838 4492 8286 484 15663 15092 16994 1733 14990 7480 8385 146 6178 723 16279 7172 9638 3167 4833 2140 15556 4588 14172 4827 10341 2227 8025 6236 8222 9308 15099 6500 11300 1531 12027 8714 15298 972 11828 13748 16847...
output:
0 2 2 2 0 2 0 0 0 0 2 0 2 0 2 2 2 2 0 2 2 2 2 2 0 0 0 2 2 0 0 0 2 0 0 0 2 2 2 0 2 2 2 2 0 2 0 0 2 2 2 0 2 2 2 2 2 2 2 2 2 2 0 2 2 0 0 2 2 2 2 2 2 2 2 0 2 0 2 2 0 0 2 2 0 2 2 2 0 0 2 0 2 0 2 0 1 2 2 2 2 2 2 2 2 2 2 0 2 2 2 0 2 2 0 0 0 2 2 0 2 2 2 0 2 2 2 0 2 2 2 2 0 2 0 0 2 0 0 2 2 0 2 2 1 0 2 2 2 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9
result:
ok Number of moves = 9
Test #34:
score: 9
Accepted
time: 0ms
memory: 9372kb
input:
17000 20000 3 0 8234 1643 6775 9374 10955 3703 6321 10629 14636 3939 8560 391 12508 4793 14716 5224 9429 699 5341 2520 6813 7489 11423 2241 4589 7939 12347 1007 16114 6313 8944 941 7713 3411 13099 7299 8454 1473 11524 59 9042 107 2222 16547 16552 10049 15651 638 9620 11948 16966 3137 14950 3159 1136...
output:
1 2 1 1 1 1 2 0 1 2 1 2 0 2 1 2 1 2 2 0 2 2 2 2 1 0 1 2 2 0 0 0 1 2 2 2 2 0 1 1 0 0 2 0 2 1 1 0 1 0 2 2 2 0 0 0 1 0 0 0 2 2 2 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 2 0 2 1 1 2 2 1 2 2 2 2 0 2 0 1 0 0 0 0 2 1 1 1 0 1 1 2 1 2 2 2 0 1 2 1 1 0 2 2 0 0 2 2 1 1 2 1 0 2 2 2 2 1 0 2 0 2 1 2 1 2 1 1 0 1 0 0 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 284
result:
ok Number of moves = 284
Test #35:
score: 9
Accepted
time: 26ms
memory: 9248kb
input:
17000 20000 3 0 5688 1643 6775 9374 10955 3703 6321 10629 14636 3939 8560 391 12508 4793 14716 5224 9429 699 5341 2520 6813 7489 11423 2241 4589 7939 12347 1007 16114 6313 8944 941 7713 3411 13099 7299 8454 1473 11524 59 9042 107 2222 16547 16552 10049 15651 638 9620 11948 16966 3137 14950 3159 1136...
output:
1 2 1 1 1 1 2 0 1 2 1 2 0 2 1 2 1 2 2 0 2 2 2 2 1 0 1 2 2 0 0 0 1 2 2 2 2 0 1 1 0 0 2 0 2 1 1 0 1 0 2 2 2 0 0 0 1 0 0 0 2 2 2 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 2 0 2 1 1 2 2 1 2 2 2 2 0 2 0 1 0 0 0 0 2 1 1 1 0 1 1 2 1 2 2 2 0 1 2 1 1 0 2 2 0 0 2 2 1 1 2 1 0 2 2 2 2 1 0 2 0 2 1 2 1 2 1 1 0 1 0 0 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 170
result:
ok Number of moves = 170
Test #36:
score: 9
Accepted
time: 22ms
memory: 9776kb
input:
17000 20000 3 0 2189 198 407 7963 9285 7935 16583 6975 15222 156 12638 4761 9002 2013 11879 13655 14150 13760 15662 8763 11686 12349 16602 1210 16269 8492 14369 3406 5647 2977 7023 13987 15855 5916 14670 4056 6317 1038 11564 3433 9479 9231 12619 5497 9047 10609 12729 1797 6630 5985 14772 4690 10066 ...
output:
0 2 2 0 1 1 2 0 1 0 0 0 1 0 1 1 2 0 0 1 2 2 1 2 0 0 2 1 1 2 1 1 2 2 0 0 0 0 0 2 0 1 1 1 1 0 0 0 0 2 0 1 2 1 2 2 0 0 0 0 2 0 1 2 2 2 2 0 1 2 0 1 1 1 1 1 1 0 0 2 1 1 1 1 2 1 0 2 0 0 0 1 0 0 1 2 0 0 0 1 1 2 1 2 1 0 2 0 2 2 1 2 1 1 1 2 1 2 1 0 0 1 0 1 1 1 2 1 0 0 1 0 1 1 2 2 1 1 2 1 2 0 0 1 1 2 2 2 1 2 ...
input:
Interaction has been finished!
output:
Number of moves = 8717
result:
ok Number of moves = 8717
Test #37:
score: 9
Accepted
time: 24ms
memory: 9496kb
input:
17000 20000 3 0 13008 198 407 7963 9285 7935 16583 6975 15222 156 12638 4761 9002 2013 11879 13655 14150 13760 15662 8763 11686 12349 16602 1210 16269 8492 14369 3406 5647 2977 7023 13987 15855 5916 14670 4056 6317 1038 11564 3433 9479 9231 12619 5497 9047 10609 12729 1797 6630 5985 14772 4690 10066...
output:
0 2 2 0 1 1 2 0 1 0 0 0 1 0 1 1 2 0 0 1 2 2 1 2 0 0 2 1 1 2 1 1 2 2 0 0 0 0 0 2 0 1 1 1 1 0 0 0 0 2 0 1 2 1 2 2 0 0 0 0 2 0 1 2 2 2 2 0 1 2 0 1 1 1 1 1 1 0 0 2 1 1 1 1 2 1 0 2 0 0 0 1 0 0 1 2 0 0 0 1 1 2 1 2 1 0 2 0 2 2 1 2 1 1 1 2 1 2 1 0 0 1 0 1 1 1 2 1 0 0 1 0 1 1 2 2 1 1 2 1 2 0 0 1 1 2 2 2 1 2 ...
input:
Interaction has been finished!
output:
Number of moves = 3738
result:
ok Number of moves = 3738
Test #38:
score: 9
Accepted
time: 28ms
memory: 10840kb
input:
20000 20000 3 0 9802 8195 11018 4934 8418 8736 14416 11417 17429 476 19740 692 4604 1198 6384 10136 17716 4632 13854 3740 12685 3431 15532 2060 5415 4701 6708 3071 17438 12747 14213 13652 14058 14633 18368 703 923 9617 13666 9348 16762 7487 16462 15460 19242 2801 2958 9116 10070 8970 19335 4252 1617...
output:
0 2 1 2 0 1 2 0 2 1 1 1 0 0 1 2 0 2 0 1 1 1 0 1 0 1 2 0 1 2 1 0 2 0 1 0 0 1 0 1 0 0 0 1 2 1 0 2 0 1 1 1 0 1 0 2 0 0 1 0 0 1 2 1 2 1 0 1 1 1 0 1 1 1 2 2 1 1 0 1 1 2 0 0 1 0 1 0 1 0 0 1 2 2 1 2 0 0 2 0 1 0 1 1 1 0 2 0 0 0 0 0 1 2 1 2 2 1 0 2 2 0 2 0 0 1 0 1 2 1 0 2 0 0 0 1 1 0 0 0 2 1 2 1 2 1 2 1 2 0 ...
input:
Interaction has been finished!
output:
Number of moves = 10000
result:
ok Number of moves = 10000
Test #39:
score: 9
Accepted
time: 26ms
memory: 9180kb
input:
17000 20000 3 0 7845 5583 8863 3589 6242 7312 11080 12117 16234 5653 7745 13049 15467 3440 12765 3291 11440 2682 6794 10169 15080 2032 15543 7153 16919 1929 3798 2077 9466 1562 15895 1359 5725 13719 16462 7519 15243 1131 9146 4708 7647 3581 11604 2807 12817 4 14606 13121 13465 174 15619 965 5750 131...
output:
2 1 0 1 0 1 2 2 1 2 0 0 2 1 0 1 2 1 2 2 1 2 2 1 2 2 1 2 2 2 2 1 1 2 2 0 1 0 1 2 0 1 1 1 1 1 0 2 2 0 1 2 2 1 0 2 0 1 2 2 0 1 2 1 1 0 1 1 1 2 2 0 2 1 2 0 0 2 1 2 2 2 2 0 1 0 0 2 2 1 2 1 1 2 2 0 1 1 1 1 2 2 2 1 1 1 0 1 2 0 1 2 2 1 0 0 1 0 2 2 1 0 1 2 1 0 1 0 0 1 2 2 2 0 1 1 2 2 0 1 1 1 2 1 1 0 1 0 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 1065
result:
ok Number of moves = 1065
Test #40:
score: 9
Accepted
time: 16ms
memory: 9348kb
input:
17000 20000 3 0 8507 5583 8863 3589 6242 7312 11080 12117 16234 5653 7745 13049 15467 3440 12765 3291 11440 2682 6794 10169 15080 2032 15543 7153 16919 1929 3798 2077 9466 1562 15895 1359 5725 13719 16462 7519 15243 1131 9146 4708 7647 3581 11604 2807 12817 4 14606 13121 13465 174 15619 965 5750 131...
output:
2 1 0 1 0 1 2 2 1 2 0 0 2 1 0 1 2 1 2 2 1 2 2 1 2 2 1 2 2 2 2 1 1 2 2 0 1 0 1 2 0 1 1 1 1 1 0 2 2 0 1 2 2 1 0 2 0 1 2 2 0 1 2 1 1 0 1 1 1 2 2 0 2 1 2 0 0 2 1 2 2 2 2 0 1 0 0 2 2 1 2 1 1 2 2 0 1 1 1 1 2 2 2 1 1 1 0 1 2 0 1 2 2 1 0 0 1 0 2 2 1 0 1 2 1 0 1 0 0 1 2 2 2 0 1 1 2 2 0 1 1 1 2 1 1 0 1 0 2 2 ...
input:
Interaction has been finished!
output:
Number of moves = 1289
result:
ok Number of moves = 1289
Subtask #5:
score: 5
Accepted
Test #41:
score: 5
Accepted
time: 0ms
memory: 4008kb
input:
500 499 2 1000 58 245 290 162 175 30 92 239 365 174 270 83 424 240 343 72 141 3 474 31 187 128 356 92 100 76 499 174 225 139 197 65 168 167 456 384 429 239 344 370 495 157 231 0 163 164 236 155 426 200 436 133 304 259 441 119 279 33 202 108 159 198 371 158 417 107 139 327 357 68 165 90 148 174 300 0...
output:
1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 6
result:
ok Number of moves = 6
Test #42:
score: 5
Accepted
time: 0ms
memory: 3796kb
input:
6 5 2 12 2 3 5 2 4 1 2 0 5 2 3
output:
1 1 1 0 0
input:
Interaction has been finished!
output:
Number of moves = 3
result:
ok Number of moves = 3
Test #43:
score: 5
Accepted
time: 2ms
memory: 4180kb
input:
500 499 2 1000 143 143 436 0 42 143 243 143 332 143 159 143 245 0 248 0 306 38 143 0 491 0 37 143 420 0 400 0 407 0 122 0 123 143 217 143 304 143 453 0 179 46 143 143 338 0 448 0 321 82 143 143 151 0 204 143 363 0 412 0 121 143 437 0 137 0 431 21 143 143 250 143 378 143 205 92 143 143 233 26 143 0 2...
output:
1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #44:
score: 5
Accepted
time: 2ms
memory: 4200kb
input:
499 498 2 998 204 10 450 377 381 235 416 67 160 34 315 46 469 3 7 108 360 196 295 222 470 78 310 19 94 16 376 131 387 60 70 135 198 287 310 142 482 127 265 303 392 81 285 353 395 257 268 39 162 110 347 261 403 234 352 426 476 44 162 244 348 250 363 176 411 25 85 95 492 392 488 465 494 83 445 381 455...
output:
0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 498
result:
ok Number of moves = 498
Test #45:
score: 5
Accepted
time: 2ms
memory: 4032kb
input:
500 499 2 1000 286 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 499
result:
ok Number of moves = 499
Test #46:
score: 5
Accepted
time: 2ms
memory: 4032kb
input:
500 499 2 1000 455 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 500
result:
ok Number of moves = 500
Test #47:
score: 5
Accepted
time: 2ms
memory: 3960kb
input:
500 499 2 1000 149 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 501
result:
ok Number of moves = 501
Test #48:
score: 5
Accepted
time: 2ms
memory: 4036kb
input:
500 499 2 1000 246 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 496
result:
ok Number of moves = 496
Test #49:
score: 5
Accepted
time: 2ms
memory: 3960kb
input:
500 499 2 1000 309 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 501
result:
ok Number of moves = 501
Test #50:
score: 5
Accepted
time: 2ms
memory: 3972kb
input:
500 499 2 1000 438 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 3...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 500
result:
ok Number of moves = 500
Test #51:
score: 5
Accepted
time: 2ms
memory: 3944kb
input:
500 499 2 1000 11 322 418 232 242 51 152 409 435 124 486 14 290 324 414 352 385 310 435 177 227 147 327 56 407 53 241 473 493 27 373 319 378 349 388 205 241 400 445 354 375 266 480 75 195 208 325 306 467 15 32 43 430 238 485 104 391 100 484 40 389 166 225 198 209 405 432 27 260 357 472 99 158 225 35...
output:
0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #52:
score: 5
Accepted
time: 2ms
memory: 4016kb
input:
498 497 2 996 45 412 437 143 281 148 269 403 427 317 365 318 432 400 457 80 491 68 316 162 224 48 124 210 329 307 363 109 139 4 427 314 433 139 174 51 160 14 402 154 188 11 155 5 323 251 377 165 166 273 395 398 476 163 472 20 380 338 354 303 311 55 318 170 262 211 446 215 242 60 77 124 260 143 230 7...
output:
1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 148
result:
ok Number of moves = 148
Test #53:
score: 5
Accepted
time: 2ms
memory: 3952kb
input:
498 497 2 996 426 412 437 143 281 148 269 403 427 317 365 318 432 400 457 80 491 68 316 162 224 48 124 210 329 307 363 109 139 4 427 314 433 139 174 51 160 14 402 154 188 11 155 5 323 251 377 165 166 273 395 398 476 163 472 20 380 338 354 303 311 55 318 170 262 211 446 215 242 60 77 124 260 143 230 ...
output:
1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 149
result:
ok Number of moves = 149
Test #54:
score: 5
Accepted
time: 2ms
memory: 3968kb
input:
500 499 2 1000 106 258 310 108 330 140 329 260 447 142 415 32 493 476 480 99 108 71 383 229 375 255 460 124 344 134 472 13 218 137 390 97 236 126 141 108 391 108 467 240 484 2 86 343 393 45 214 196 337 73 108 91 374 65 436 103 233 121 396 108 425 348 430 318 448 13 24 219 326 44 216 8 256 213 464 16...
output:
0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 115
result:
ok Number of moves = 115
Test #55:
score: 5
Accepted
time: 2ms
memory: 3964kb
input:
500 499 2 1000 25 258 310 108 330 140 329 260 447 142 415 32 493 476 480 99 108 71 383 229 375 255 460 124 344 134 472 13 218 137 390 97 236 126 141 108 391 108 467 240 484 2 86 343 393 45 214 196 337 73 108 91 374 65 436 103 233 121 396 108 425 348 430 318 448 13 24 219 326 44 216 8 256 213 464 160...
output:
0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 216
result:
ok Number of moves = 216
Test #56:
score: 5
Accepted
time: 2ms
memory: 3956kb
input:
500 499 2 1000 144 417 449 288 401 185 278 21 272 188 455 40 478 141 450 155 229 113 462 54 250 162 333 50 135 121 363 207 271 330 434 334 462 103 252 4 373 434 494 40 59 127 170 111 146 330 369 344 483 332 460 141 263 93 220 45 445 338 398 110 185 104 361 93 214 237 401 150 405 427 437 414 493 220 ...
output:
1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 122
result:
ok Number of moves = 122
Test #57:
score: 5
Accepted
time: 2ms
memory: 4020kb
input:
500 499 2 1000 238 417 449 288 401 185 278 21 272 188 455 40 478 141 450 155 229 113 462 54 250 162 333 50 135 121 363 207 271 330 434 334 462 103 252 4 373 434 494 40 59 127 170 111 146 330 369 344 483 332 460 141 263 93 220 45 445 338 398 110 185 104 361 93 214 237 401 150 405 427 437 414 493 220 ...
output:
1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 140
result:
ok Number of moves = 140
Test #58:
score: 5
Accepted
time: 2ms
memory: 3968kb
input:
500 499 2 1000 164 417 449 288 401 185 278 21 272 188 455 40 478 141 450 155 229 113 462 54 250 162 333 50 135 121 363 207 271 330 434 334 462 103 252 4 373 434 494 40 59 127 170 111 146 330 369 344 483 332 460 141 263 93 220 45 445 338 398 110 185 104 361 93 214 237 401 150 405 427 437 414 493 220 ...
output:
1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 137
result:
ok Number of moves = 137
Test #59:
score: 5
Accepted
time: 2ms
memory: 3940kb
input:
500 499 2 1000 413 417 449 288 401 185 278 21 272 188 455 40 478 141 450 155 229 113 462 54 250 162 333 50 135 121 363 207 271 330 434 334 462 103 252 4 373 434 494 40 59 127 170 111 146 330 369 344 483 332 460 141 263 93 220 45 445 338 398 110 185 104 361 93 214 237 401 150 405 427 437 414 493 220 ...
output:
1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 142
result:
ok Number of moves = 142
Test #60:
score: 5
Accepted
time: 2ms
memory: 3936kb
input:
500 499 2 1000 245 417 449 288 401 185 278 21 272 188 455 40 478 141 450 155 229 113 462 54 250 162 333 50 135 121 363 207 271 330 434 334 462 103 252 4 373 434 494 40 59 127 170 111 146 330 369 344 483 332 460 141 263 93 220 45 445 338 398 110 185 104 361 93 214 237 401 150 405 427 437 414 493 220 ...
output:
1 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 90
result:
ok Number of moves = 90
Test #61:
score: 5
Accepted
time: 2ms
memory: 3944kb
input:
498 497 2 996 139 64 413 222 260 222 236 333 416 117 447 256 447 175 203 239 319 109 369 78 343 145 206 143 341 211 319 69 151 332 339 66 434 252 456 88 92 185 274 302 395 149 374 201 369 40 205 19 69 175 446 92 171 15 28 93 395 60 424 281 409 81 459 102 240 154 393 371 447 311 489 73 300 83 456 24 ...
output:
0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 96
result:
ok Number of moves = 96
Test #62:
score: 5
Accepted
time: 2ms
memory: 3964kb
input:
498 497 2 996 349 64 413 222 260 222 236 333 416 117 447 256 447 175 203 239 319 109 369 78 343 145 206 143 341 211 319 69 151 332 339 66 434 252 456 88 92 185 274 302 395 149 374 201 369 40 205 19 69 175 446 92 171 15 28 93 395 60 424 281 409 81 459 102 240 154 393 371 447 311 489 73 300 83 456 24 ...
output:
0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 92
result:
ok Number of moves = 92
Test #63:
score: 5
Accepted
time: 2ms
memory: 4216kb
input:
498 497 2 996 273 64 413 222 260 222 236 333 416 117 447 256 447 175 203 239 319 109 369 78 343 145 206 143 341 211 319 69 151 332 339 66 434 252 456 88 92 185 274 302 395 149 374 201 369 40 205 19 69 175 446 92 171 15 28 93 395 60 424 281 409 81 459 102 240 154 393 371 447 311 489 73 300 83 456 24 ...
output:
0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 95
result:
ok Number of moves = 95
Test #64:
score: 5
Accepted
time: 2ms
memory: 4008kb
input:
498 497 2 996 469 64 413 222 260 222 236 333 416 117 447 256 447 175 203 239 319 109 369 78 343 145 206 143 341 211 319 69 151 332 339 66 434 252 456 88 92 185 274 302 395 149 374 201 369 40 205 19 69 175 446 92 171 15 28 93 395 60 424 281 409 81 459 102 240 154 393 371 447 311 489 73 300 83 456 24 ...
output:
0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 105
result:
ok Number of moves = 105
Test #65:
score: 5
Accepted
time: 2ms
memory: 3960kb
input:
499 498 2 998 193 193 349 155 299 127 290 179 465 69 286 376 491 128 394 346 457 165 419 64 127 390 498 173 405 64 492 371 487 120 193 81 366 77 166 266 486 273 489 2 157 104 446 129 251 307 481 109 290 97 456 78 490 173 455 236 486 164 348 316 375 85 182 52 485 178 397 56 86 75 351 276 337 88 224 9...
output:
0 1 1 0 1 0 1 1 0 0 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 94
result:
ok Number of moves = 94
Test #66:
score: 5
Accepted
time: 2ms
memory: 4212kb
input:
499 498 2 998 309 165 393 258 436 388 451 337 460 232 278 308 424 34 249 331 335 116 195 306 496 68 260 388 453 260 342 161 490 35 436 85 422 151 426 37 181 90 442 73 273 202 385 399 413 212 269 165 469 142 257 58 365 55 258 47 311 87 97 404 417 6 359 259 489 165 196 357 492 41 147 208 448 63 243 40...
output:
0 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 96
result:
ok Number of moves = 96
Test #67:
score: 5
Accepted
time: 2ms
memory: 4216kb
input:
499 498 2 998 481 230 264 58 261 324 391 34 126 93 382 43 273 412 469 100 497 31 496 382 449 426 482 191 399 437 465 258 440 21 108 30 410 292 404 19 422 73 190 195 388 290 386 28 375 57 481 1 364 5 181 83 382 437 462 68 423 328 450 161 307 258 480 10 266 76 190 438 472 133 220 61 80 183 186 261 334...
output:
1 1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 1 1 0 1 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 99
result:
ok Number of moves = 99
Test #68:
score: 5
Accepted
time: 2ms
memory: 3948kb
input:
499 498 2 998 480 224 480 277 429 278 462 144 302 216 246 117 255 243 377 313 356 127 181 292 339 165 235 141 191 355 431 468 495 389 444 188 289 335 461 31 444 76 274 1 345 24 266 67 472 268 310 222 473 226 383 154 268 99 210 357 404 52 293 53 186 19 31 157 363 165 315 3 420 33 241 143 185 124 210 ...
output:
1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 109
result:
ok Number of moves = 109
Subtask #6:
score: 71
Accepted
Test #69:
score: 71
Accepted
time: 14ms
memory: 8652kb
input:
20000 19999 2 12 18478 5245 8728 2144 5219 16087 17623 16037 17821 1333 1523 6983 7616 8223 10814 6953 18933 9487 12057 5266 17099 4628 14074 13345 16201 4663 16298 11086 17418 9448 13719 623 7016 4569 7750 12603 19679 10508 15041 2003 19218 8935 12640 12167 18714 13762 15878 2264 19638 17971 19220 ...
output:
0 0 1 1 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 73
result:
ok Number of moves = 73
Test #70:
score: 71
Accepted
time: 24ms
memory: 9448kb
input:
20000 19999 2 12 15535 14233 19823 3671 14519 4101 19782 655 18577 9057 14995 10360 19430 10922 19309 5046 18443 11133 16830 15377 16400 927 11030 10225 16425 6592 7716 155 4118 10898 18146 4312 14944 17785 18332 4443 9820 5308 8635 4948 5081 6722 16746 16991 18234 17331 18033 1851 11205 8335 18300 ...
output:
1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 7219
result:
ok Number of moves = 7219
Test #71:
score: 71
Accepted
time: 0ms
memory: 3804kb
input:
2 1 2 12 1 0 1
output:
0
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #72:
score: 71
Accepted
time: 8ms
memory: 8816kb
input:
20000 19999 2 12 4845 1892 4845 0 15229 0 4911 4845 14719 0 12636 4845 14065 0 7202 4845 6694 0 19000 0 12941 0 6729 0 13611 0 6142 0 18789 4845 12470 0 12869 2557 4845 0 15622 4845 18923 0 19919 0 12014 0 12800 4845 14953 2941 4845 0 2774 4845 15181 0 5576 4845 15475 4845 14058 0 14949 0 16762 0 34...
output:
1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #73:
score: 71
Accepted
time: 28ms
memory: 9776kb
input:
19998 19997 2 12 16973 14197 17750 3073 6510 1402 13540 3701 5002 684 11958 10455 13427 5612 13347 72 10267 273 18867 7150 18555 7003 18008 6011 17963 2581 5345 2858 12960 6416 12165 7965 18130 11946 15586 2939 7986 7217 7314 6071 7540 521 9036 10674 18946 3241 12525 8406 13951 6342 14027 7775 16085...
output:
1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19997
result:
ok Number of moves = 19997
Test #74:
score: 71
Accepted
time: 34ms
memory: 9776kb
input:
19998 19997 2 12 5250 14197 17750 3073 6510 1402 13540 3701 5002 684 11958 10455 13427 5612 13347 72 10267 273 18867 7150 18555 7003 18008 6011 17963 2581 5345 2858 12960 6416 12165 7965 18130 11946 15586 2939 7986 7217 7314 6071 7540 521 9036 10674 18946 3241 12525 8406 13951 6342 14027 7775 16085 ...
output:
1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19996
result:
ok Number of moves = 19996
Test #75:
score: 71
Accepted
time: 14ms
memory: 9108kb
input:
19998 19997 2 12 15051 14197 17750 3073 6510 1402 13540 3701 5002 684 11958 10455 13427 5612 13347 72 10267 273 18867 7150 18555 7003 18008 6011 17963 2581 5345 2858 12960 6416 12165 7965 18130 11946 15586 2939 7986 7217 7314 6071 7540 521 9036 10674 18946 3241 12525 8406 13951 6342 14027 7775 16085...
output:
1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 1001
result:
ok Number of moves = 1001
Test #76:
score: 71
Accepted
time: 14ms
memory: 9172kb
input:
19998 19997 2 12 1715 14197 17750 3073 6510 1402 13540 3701 5002 684 11958 10455 13427 5612 13347 72 10267 273 18867 7150 18555 7003 18008 6011 17963 2581 5345 2858 12960 6416 12165 7965 18130 11946 15586 2939 7986 7217 7314 6071 7540 521 9036 10674 18946 3241 12525 8406 13951 6342 14027 7775 16085 ...
output:
1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 998
result:
ok Number of moves = 998
Test #77:
score: 71
Accepted
time: 16ms
memory: 9780kb
input:
19999 19998 2 12 14007 2069 17293 4223 14499 5499 12930 733 13722 1147 11927 9316 18982 14127 17126 7888 11291 726 4951 9228 16257 11129 12122 1520 4885 5069 13838 14520 19322 8210 16551 3635 19676 58 14670 8803 12335 7883 17831 12807 19884 5750 10918 4035 5469 6214 10364 17016 17777 8390 17803 1159...
output:
0 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 19998
result:
ok Number of moves = 19998
Test #78:
score: 71
Accepted
time: 32ms
memory: 9780kb
input:
19999 19998 2 12 18647 2069 17293 4223 14499 5499 12930 733 13722 1147 11927 9316 18982 14127 17126 7888 11291 726 4951 9228 16257 11129 12122 1520 4885 5069 13838 14520 19322 8210 16551 3635 19676 58 14670 8803 12335 7883 17831 12807 19884 5750 10918 4035 5469 6214 10364 17016 17777 8390 17803 1159...
output:
0 0 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 19997
result:
ok Number of moves = 19997
Test #79:
score: 71
Accepted
time: 24ms
memory: 9776kb
input:
20000 19999 2 12 9497 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604 ...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19999
result:
ok Number of moves = 19999
Test #80:
score: 71
Accepted
time: 12ms
memory: 10224kb
input:
20000 19999 2 12 891 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604 4...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 20000
result:
ok Number of moves = 20000
Test #81:
score: 71
Accepted
time: 20ms
memory: 9784kb
input:
20000 19999 2 12 13050 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 20001
result:
ok Number of moves = 20001
Test #82:
score: 71
Accepted
time: 26ms
memory: 9776kb
input:
20000 19999 2 12 12964 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19996
result:
ok Number of moves = 19996
Test #83:
score: 71
Accepted
time: 32ms
memory: 10196kb
input:
20000 19999 2 12 17890 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 20001
result:
ok Number of moves = 20001
Test #84:
score: 71
Accepted
time: 24ms
memory: 10156kb
input:
20000 19999 2 12 15032 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 20000
result:
ok Number of moves = 20000
Test #85:
score: 71
Accepted
time: 30ms
memory: 9612kb
input:
20000 19999 2 12 10598 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13343
result:
ok Number of moves = 13343
Test #86:
score: 71
Accepted
time: 30ms
memory: 9460kb
input:
20000 19999 2 12 5786 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604 ...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13336
result:
ok Number of moves = 13336
Test #87:
score: 71
Accepted
time: 22ms
memory: 9460kb
input:
20000 19999 2 12 9366 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604 ...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13341
result:
ok Number of moves = 13341
Test #88:
score: 71
Accepted
time: 28ms
memory: 9516kb
input:
20000 19999 2 12 11526 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13340
result:
ok Number of moves = 13340
Test #89:
score: 71
Accepted
time: 30ms
memory: 9512kb
input:
20000 19999 2 12 10123 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13333
result:
ok Number of moves = 13333
Test #90:
score: 71
Accepted
time: 30ms
memory: 9396kb
input:
20000 19999 2 12 15682 16842 18164 4162 9984 9427 13651 12103 14508 6990 11259 9537 15153 898 11581 4900 14283 10570 11431 2069 3126 1641 13967 6979 9254 12886 19555 7482 15506 13471 19419 10915 13477 3943 5575 8347 14484 7950 14809 17270 18337 15578 19244 4066 19201 844 19882 7635 19076 10905 14604...
output:
1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13338
result:
ok Number of moves = 13338
Test #91:
score: 71
Accepted
time: 14ms
memory: 8720kb
input:
19998 19997 2 12 4001 4313 14791 4055 12040 4328 11750 1380 7942 3222 9865 8946 15131 4112 6709 7626 18770 2556 12998 14410 15748 7918 15592 2459 18480 7906 14120 715 12645 814 19728 2064 13904 9520 17686 2105 17720 4944 8333 1360 3702 2541 2548 1284 12432 556 18568 12117 14712 6153 9790 9240 9955 3...
output:
1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 1 0 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 101
result:
ok Number of moves = 101
Test #92:
score: 71
Accepted
time: 22ms
memory: 8700kb
input:
19998 19997 2 12 10860 4313 14791 4055 12040 4328 11750 1380 7942 3222 9865 8946 15131 4112 6709 7626 18770 2556 12998 14410 15748 7918 15592 2459 18480 7906 14120 715 12645 814 19728 2064 13904 9520 17686 2105 17720 4944 8333 1360 3702 2541 2548 1284 12432 556 18568 12117 14712 6153 9790 9240 9955 ...
output:
1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 1 0 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 108
result:
ok Number of moves = 108
Test #93:
score: 71
Accepted
time: 22ms
memory: 8916kb
input:
19998 19997 2 12 5866 1832 7520 3577 16584 2089 9485 1646 5768 1563 12709 14098 15299 14790 16552 17845 19490 14644 16395 10235 13873 1298 8475 8582 18624 40 9866 5315 10698 5375 8579 16105 16261 1173 7442 17464 19269 9211 11696 2295 5980 2046 19112 846 5305 12951 16803 5774 6766 9408 12092 3287 871...
output:
1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2089
result:
ok Number of moves = 2089
Test #94:
score: 71
Accepted
time: 28ms
memory: 8928kb
input:
19998 19997 2 12 19026 1832 7520 3577 16584 2089 9485 1646 5768 1563 12709 14098 15299 14790 16552 17845 19490 14644 16395 10235 13873 1298 8475 8582 18624 40 9866 5315 10698 5375 8579 16105 16261 1173 7442 17464 19269 9211 11696 2295 5980 2046 19112 846 5305 12951 16803 5774 6766 9408 12092 3287 87...
output:
1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2084
result:
ok Number of moves = 2084
Test #95:
score: 71
Accepted
time: 20ms
memory: 9184kb
input:
19998 19997 2 12 1391 15653 18311 1245 9582 18673 19521 3039 13643 2414 8759 6166 11313 4050 8607 7884 10083 3854 14102 9704 15448 12981 19576 3307 10465 5867 18490 9419 15429 8972 14448 7328 12764 1594 8948 2207 11620 7089 16713 846 8219 271 6896 278 18092 5773 9584 4996 14005 3422 16175 18304 1976...
output:
0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10011
result:
ok Number of moves = 10011
Test #96:
score: 71
Accepted
time: 20ms
memory: 9244kb
input:
19998 19997 2 12 8492 15653 18311 1245 9582 18673 19521 3039 13643 2414 8759 6166 11313 4050 8607 7884 10083 3854 14102 9704 15448 12981 19576 3307 10465 5867 18490 9419 15429 8972 14448 7328 12764 1594 8948 2207 11620 7089 16713 846 8219 271 6896 278 18092 5773 9584 4996 14005 3422 16175 18304 1976...
output:
0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10006
result:
ok Number of moves = 10006
Test #97:
score: 71
Accepted
time: 28ms
memory: 9252kb
input:
19998 19997 2 12 7855 7603 10363 2984 12139 13483 15962 2672 7800 5461 10772 8002 17109 549 19436 2432 17220 3450 3938 12446 15037 567 12282 3585 4881 17699 19008 173 9477 4759 9931 1830 14017 4559 16867 1186 9643 15649 18288 3433 7819 14618 14999 6772 8087 8 19736 19 16302 11549 13203 49 3118 4726 ...
output:
1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 10242
result:
ok Number of moves = 10242
Test #98:
score: 71
Accepted
time: 18ms
memory: 9252kb
input:
19998 19997 2 12 6875 7603 10363 2984 12139 13483 15962 2672 7800 5461 10772 8002 17109 549 19436 2432 17220 3450 3938 12446 15037 567 12282 3585 4881 17699 19008 173 9477 4759 9931 1830 14017 4559 16867 1186 9643 15649 18288 3433 7819 14618 14999 6772 8087 8 19736 19 16302 11549 13203 49 3118 4726 ...
output:
1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 10249
result:
ok Number of moves = 10249
Test #99:
score: 71
Accepted
time: 14ms
memory: 8680kb
input:
20000 19999 2 12 3730 11156 12943 5809 10107 625 15667 6792 11879 1131 15235 6239 11535 10385 15506 6889 19086 11053 13664 5695 14839 4478 10628 17 4162 8930 13215 4736 19290 2990 17372 1614 17354 290 1907 15792 18547 4162 12253 9199 11467 5227 10029 15928 19033 10938 17154 114 2459 3632 11493 183 1...
output:
0 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 24
result:
ok Number of moves = 24
Test #100:
score: 71
Accepted
time: 6ms
memory: 8724kb
input:
20000 19999 2 12 1408 11156 12943 5809 10107 625 15667 6792 11879 1131 15235 6239 11535 10385 15506 6889 19086 11053 13664 5695 14839 4478 10628 17 4162 8930 13215 4736 19290 2990 17372 1614 17354 290 1907 15792 18547 4162 12253 9199 11467 5227 10029 15928 19033 10938 17154 114 2459 3632 11493 183 1...
output:
0 1 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 19
result:
ok Number of moves = 19
Test #101:
score: 71
Accepted
time: 14ms
memory: 8984kb
input:
20000 19999 2 12 6228 3876 13713 8571 16774 1755 12898 3401 12562 105 5052 3648 19337 6277 8835 15775 17521 6439 10958 8564 17718 11441 17919 7836 10619 14500 19388 8348 15415 1702 9001 10117 14541 5497 17436 5735 11011 17160 18498 508 9666 10525 19720 5662 19915 1064 3012 6053 7840 5239 5863 4907 7...
output:
1 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2134
result:
ok Number of moves = 2134
Test #102:
score: 71
Accepted
time: 24ms
memory: 8988kb
input:
20000 19999 2 12 8926 3876 13713 8571 16774 1755 12898 3401 12562 105 5052 3648 19337 6277 8835 15775 17521 6439 10958 8564 17718 11441 17919 7836 10619 14500 19388 8348 15415 1702 9001 10117 14541 5497 17436 5735 11011 17160 18498 508 9666 10525 19720 5662 19915 1064 3012 6053 7840 5239 5863 4907 7...
output:
1 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2437
result:
ok Number of moves = 2437
Test #103:
score: 71
Accepted
time: 26ms
memory: 9248kb
input:
20000 19999 2 12 15519 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 1104...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9000
result:
ok Number of moves = 9000
Test #104:
score: 71
Accepted
time: 20ms
memory: 9248kb
input:
20000 19999 2 12 5276 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 11049...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9007
result:
ok Number of moves = 9007
Test #105:
score: 71
Accepted
time: 20ms
memory: 9176kb
input:
20000 19999 2 12 18314 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 1104...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9008
result:
ok Number of moves = 9008
Test #106:
score: 71
Accepted
time: 28ms
memory: 9248kb
input:
20000 19999 2 12 15956 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 1104...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9003
result:
ok Number of moves = 9003
Test #107:
score: 71
Accepted
time: 26ms
memory: 9348kb
input:
20000 19999 2 12 2508 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 11049...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9010
result:
ok Number of moves = 9010
Test #108:
score: 71
Accepted
time: 28ms
memory: 9364kb
input:
20000 19999 2 12 5294 4731 16017 7233 18446 1112 15082 1745 10708 852 16333 2202 14040 8761 9780 3400 3755 5338 19258 6946 11132 588 10414 2779 5749 1694 5079 18451 19296 7013 14822 10379 14204 10402 15002 9077 14586 12095 15831 2472 10293 5357 13082 2801 14461 9671 17393 6347 14388 4995 17173 11049...
output:
1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 9011
result:
ok Number of moves = 9011
Test #109:
score: 71
Accepted
time: 30ms
memory: 9612kb
input:
20000 19999 2 12 9403 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 11136...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13248
result:
ok Number of moves = 13248
Test #110:
score: 71
Accepted
time: 22ms
memory: 9508kb
input:
20000 19999 2 12 12817 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 1113...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13249
result:
ok Number of moves = 13249
Test #111:
score: 71
Accepted
time: 30ms
memory: 9516kb
input:
20000 19999 2 12 7689 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 11136...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13244
result:
ok Number of moves = 13244
Test #112:
score: 71
Accepted
time: 14ms
memory: 9460kb
input:
20000 19999 2 12 8378 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 11136...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 14002
result:
ok Number of moves = 14002
Test #113:
score: 71
Accepted
time: 22ms
memory: 9440kb
input:
20000 19999 2 12 19979 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 1113...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13997
result:
ok Number of moves = 13997
Test #114:
score: 71
Accepted
time: 32ms
memory: 9612kb
input:
20000 19999 2 12 16832 11617 19746 10871 14657 712 7580 17475 18019 14092 18245 1222 6046 2349 9905 1525 14936 8409 18786 3372 12648 1070 7494 8134 13297 579 18553 5462 14767 36 12948 12208 19007 7923 14370 8351 15272 5863 19462 783 17384 274 18196 1279 7732 1174 6600 9552 13081 4079 12760 8865 1113...
output:
0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 14000
result:
ok Number of moves = 14000
Test #115:
score: 71
Accepted
time: 26ms
memory: 9180kb
input:
19999 19998 2 12 5023 3335 11827 14258 18043 2601 8536 5039 10570 4797 7172 11338 19191 12025 15220 6101 14741 13743 19439 18584 18585 8084 9348 2472 13697 8340 15234 12601 14579 11460 18455 812 10636 2615 6470 12045 18063 11672 15845 1920 16309 10991 12587 1471 10310 4685 9070 327 5847 1778 15356 3...
output:
1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 7023
result:
ok Number of moves = 7023
Test #116:
score: 71
Accepted
time: 26ms
memory: 9252kb
input:
19999 19998 2 12 15292 3335 11827 14258 18043 2601 8536 5039 10570 4797 7172 11338 19191 12025 15220 6101 14741 13743 19439 18584 18585 8084 9348 2472 13697 8340 15234 12601 14579 11460 18455 812 10636 2615 6470 12045 18063 11672 15845 1920 16309 10991 12587 1471 10310 4685 9070 327 5847 1778 15356 ...
output:
1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 7018
result:
ok Number of moves = 7018
Test #117:
score: 71
Accepted
time: 24ms
memory: 9360kb
input:
19999 19998 2 12 5574 3335 11827 14258 18043 2601 8536 5039 10570 4797 7172 11338 19191 12025 15220 6101 14741 13743 19439 18584 18585 8084 9348 2472 13697 8340 15234 12601 14579 11460 18455 812 10636 2615 6470 12045 18063 11672 15845 1920 16309 10991 12587 1471 10310 4685 9070 327 5847 1778 15356 3...
output:
1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 5000
result:
ok Number of moves = 5000
Test #118:
score: 71
Accepted
time: 20ms
memory: 9208kb
input:
19999 19998 2 12 2460 3335 11827 14258 18043 2601 8536 5039 10570 4797 7172 11338 19191 12025 15220 6101 14741 13743 19439 18584 18585 8084 9348 2472 13697 8340 15234 12601 14579 11460 18455 812 10636 2615 6470 12045 18063 11672 15845 1920 16309 10991 12587 1471 10310 4685 9070 327 5847 1778 15356 3...
output:
1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 7998
result:
ok Number of moves = 7998
Test #119:
score: 71
Accepted
time: 14ms
memory: 9040kb
input:
19999 19998 2 12 7844 12285 17739 9112 14220 12967 15558 2934 3267 1542 17001 182 9154 17961 19135 3948 15970 8368 9313 17477 17837 6383 11896 1019 16509 12903 14845 6632 10569 15133 16574 9856 11038 4144 9622 10272 19413 6235 16965 12150 17227 10498 15376 10222 11827 5406 14681 6342 10288 8135 1619...
output:
1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 1 0 0 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 5
result:
ok Number of moves = 5
Test #120:
score: 71
Accepted
time: 6ms
memory: 8964kb
input:
19999 19998 2 12 10181 12285 17739 9112 14220 12967 15558 2934 3267 1542 17001 182 9154 17961 19135 3948 15970 8368 9313 17477 17837 6383 11896 1019 16509 12903 14845 6632 10569 15133 16574 9856 11038 4144 9622 10272 19413 6235 16965 12150 17227 10498 15376 10222 11827 5406 14681 6342 10288 8135 161...
output:
1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 1 0 0 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 6
result:
ok Number of moves = 6
Test #121:
score: 71
Accepted
time: 22ms
memory: 8916kb
input:
19997 19996 2 12 2580 10951 16128 145 14434 3879 14009 1195 9988 13660 14498 44 12809 7853 12207 516 3113 3829 19414 6288 11746 11375 19486 8601 19560 18202 19266 13190 13682 1667 11039 9071 19747 8387 13696 7407 17964 16200 17050 12971 15184 11504 18633 287 19906 759 1336 8442 12067 5047 9106 1647 ...
output:
0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 11
result:
ok Number of moves = 11
Test #122:
score: 71
Accepted
time: 20ms
memory: 8984kb
input:
19997 19996 2 12 16484 10951 16128 145 14434 3879 14009 1195 9988 13660 14498 44 12809 7853 12207 516 3113 3829 19414 6288 11746 11375 19486 8601 19560 18202 19266 13190 13682 1667 11039 9071 19747 8387 13696 7407 17964 16200 17050 12971 15184 11504 18633 287 19906 759 1336 8442 12067 5047 9106 1647...
output:
0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 16
result:
ok Number of moves = 16
Test #123:
score: 71
Accepted
time: 22ms
memory: 8984kb
input:
19995 19994 2 12 11380 8223 13581 16975 18738 3192 14559 14578 17910 3522 6664 12387 12700 7176 11473 16913 18651 17299 19134 4925 6519 2721 12130 298 3632 691 7355 4367 16868 7189 9625 4651 11784 5595 14643 15967 18781 2559 11011 14442 19562 14757 14902 9221 11748 7943 12501 1787 15854 2657 12387 1...
output:
1 0 1 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 29
result:
ok Number of moves = 29
Test #124:
score: 71
Accepted
time: 14ms
memory: 9036kb
input:
19995 19994 2 12 18034 8223 13581 16975 18738 3192 14559 14578 17910 3522 6664 12387 12700 7176 11473 16913 18651 17299 19134 4925 6519 2721 12130 298 3632 691 7355 4367 16868 7189 9625 4651 11784 5595 14643 15967 18781 2559 11011 14442 19562 14757 14902 9221 11748 7943 12501 1787 15854 2657 12387 1...
output:
1 0 1 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 30
result:
ok Number of moves = 30
Test #125:
score: 71
Accepted
time: 20ms
memory: 8932kb
input:
19993 19992 2 12 14851 8538 9714 1790 5423 12371 19245 9119 11710 2768 16620 9299 16133 7986 10048 729 14628 5703 16790 5685 6857 4693 11430 11441 17101 5224 7263 10366 14560 4494 17447 504 8394 6595 19805 597 2666 3492 19488 1137 19811 1927 13089 1816 9995 11588 11786 10478 19200 9157 15850 313 738...
output:
0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 30
result:
ok Number of moves = 30
Test #126:
score: 71
Accepted
time: 0ms
memory: 8988kb
input:
19993 19992 2 12 18735 8538 9714 1790 5423 12371 19245 9119 11710 2768 16620 9299 16133 7986 10048 729 14628 5703 16790 5685 6857 4693 11430 11441 17101 5224 7263 10366 14560 4494 17447 504 8394 6595 19805 597 2666 3492 19488 1137 19811 1927 13089 1816 9995 11588 11786 10478 19200 9157 15850 313 738...
output:
0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 27
result:
ok Number of moves = 27
Test #127:
score: 71
Accepted
time: 14ms
memory: 8984kb
input:
19993 19992 2 12 3151 11209 13160 2889 17624 202 3332 1732 2180 14296 15865 2903 11467 2653 6890 2937 9332 4829 19511 952 16998 679 2660 9103 15154 861 3010 4624 14959 3474 14407 10983 15350 1810 2814 12688 19658 14157 15520 492 2187 16163 19228 13406 19514 8227 12701 7229 12832 7942 11943 17502 193...
output:
1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 44
result:
ok Number of moves = 44
Test #128:
score: 71
Accepted
time: 6ms
memory: 8916kb
input:
19993 19992 2 12 8820 11209 13160 2889 17624 202 3332 1732 2180 14296 15865 2903 11467 2653 6890 2937 9332 4829 19511 952 16998 679 2660 9103 15154 861 3010 4624 14959 3474 14407 10983 15350 1810 2814 12688 19658 14157 15520 492 2187 16163 19228 13406 19514 8227 12701 7229 12832 7942 11943 17502 193...
output:
1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 45
result:
ok Number of moves = 45
Subtask #7:
score: 9
Accepted
Test #129:
score: 9
Accepted
time: 6ms
memory: 8724kb
input:
20000 19999 2 6 7342 316 6377 5633 9242 8601 8623 7861 15798 5457 5677 13098 13574 5624 19611 10193 17778 1275 19154 7173 19354 6365 7184 4174 5183 3639 12340 9502 10882 5944 17443 3243 11926 17109 18374 617 16882 18024 18499 5356 16091 1557 5482 663 18524 10341 16608 579 12373 6938 14866 9298 11755...
output:
1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 41
result:
ok Number of moves = 41
Test #130:
score: 9
Accepted
time: 24ms
memory: 8916kb
input:
20000 19999 2 6 10559 1595 7629 6725 14176 2703 14396 6899 8859 4264 6948 8086 19786 12778 18916 16408 18823 2759 13248 11398 15943 3135 17554 1162 1387 4317 11107 871 14814 9203 15536 3942 5142 7687 7908 2364 3960 2494 12254 5272 19793 10843 15814 2794 5324 2452 19565 4904 7426 6757 16330 4233 9844...
output:
1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 4124
result:
ok Number of moves = 4124
Test #131:
score: 9
Accepted
time: 0ms
memory: 3876kb
input:
2 1 2 6 1 0 1
output:
0
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #132:
score: 9
Accepted
time: 18ms
memory: 8796kb
input:
20000 19999 2 6 12999 605 12999 0 18109 12999 17963 12999 15393 0 4958 12999 14472 0 174 0 18220 4367 12999 0 3795 0 7560 0 2103 0 7479 0 4924 12999 14020 0 8910 0 5932 4351 12999 0 3769 12999 14402 0 19726 12999 13325 0 4597 12999 16890 11141 12999 0 11300 12999 17010 1676 12999 12999 18338 12999 1...
output:
1 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 1
result:
ok Number of moves = 1
Test #133:
score: 9
Accepted
time: 26ms
memory: 10156kb
input:
19998 19997 2 6 157 8540 15177 14391 16019 813 7864 590 15623 8500 14833 6667 18258 3910 18535 2648 14080 2053 19699 11423 15789 9001 16856 2990 19589 7011 12518 1966 6038 4028 18774 5745 17287 5381 17911 5699 11893 6846 16586 3943 7971 744 2799 8723 14968 18697 18817 13880 15620 381 15096 2299 4630...
output:
1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19997
result:
ok Number of moves = 19997
Test #134:
score: 9
Accepted
time: 34ms
memory: 9780kb
input:
19998 19997 2 6 16368 8540 15177 14391 16019 813 7864 590 15623 8500 14833 6667 18258 3910 18535 2648 14080 2053 19699 11423 15789 9001 16856 2990 19589 7011 12518 1966 6038 4028 18774 5745 17287 5381 17911 5699 11893 6846 16586 3943 7971 744 2799 8723 14968 18697 18817 13880 15620 381 15096 2299 46...
output:
1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19996
result:
ok Number of moves = 19996
Test #135:
score: 9
Accepted
time: 14ms
memory: 8944kb
input:
19998 19997 2 6 7477 8540 15177 14391 16019 813 7864 590 15623 8500 14833 6667 18258 3910 18535 2648 14080 2053 19699 11423 15789 9001 16856 2990 19589 7011 12518 1966 6038 4028 18774 5745 17287 5381 17911 5699 11893 6846 16586 3943 7971 744 2799 8723 14968 18697 18817 13880 15620 381 15096 2299 463...
output:
1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 995
result:
ok Number of moves = 995
Test #136:
score: 9
Accepted
time: 0ms
memory: 9044kb
input:
19998 19997 2 6 6883 8540 15177 14391 16019 813 7864 590 15623 8500 14833 6667 18258 3910 18535 2648 14080 2053 19699 11423 15789 9001 16856 2990 19589 7011 12518 1966 6038 4028 18774 5745 17287 5381 17911 5699 11893 6846 16586 3943 7971 744 2799 8723 14968 18697 18817 13880 15620 381 15096 2299 463...
output:
1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 998
result:
ok Number of moves = 998
Test #137:
score: 9
Accepted
time: 24ms
memory: 9760kb
input:
19999 19998 2 6 9771 2475 14167 1240 8400 14188 17312 5839 16029 2954 7471 6588 8631 6513 19107 3060 17402 3636 7957 10847 15796 4847 15818 1118 12671 6834 16452 13410 14652 1517 12947 7118 7266 5047 5235 10681 16683 37 834 13123 13374 1339 10323 13273 14959 1016 19980 7194 9861 2301 4351 921 16478 ...
output:
0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19998
result:
ok Number of moves = 19998
Test #138:
score: 9
Accepted
time: 34ms
memory: 10220kb
input:
19999 19998 2 6 6447 2475 14167 1240 8400 14188 17312 5839 16029 2954 7471 6588 8631 6513 19107 3060 17402 3636 7957 10847 15796 4847 15818 1118 12671 6834 16452 13410 14652 1517 12947 7118 7266 5047 5235 10681 16683 37 834 13123 13374 1339 10323 13273 14959 1016 19980 7194 9861 2301 4351 921 16478 ...
output:
0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 19997
result:
ok Number of moves = 19997
Test #139:
score: 9
Accepted
time: 32ms
memory: 9772kb
input:
20000 19999 2 6 13876 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 11...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 19999
result:
ok Number of moves = 19999
Test #140:
score: 9
Accepted
time: 34ms
memory: 10224kb
input:
20000 19999 2 6 16403 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 11...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 20000
result:
ok Number of moves = 20000
Test #141:
score: 9
Accepted
time: 20ms
memory: 9772kb
input:
20000 19999 2 6 7313 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 20001
result:
ok Number of moves = 20001
Test #142:
score: 9
Accepted
time: 32ms
memory: 9712kb
input:
20000 19999 2 6 16687 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 11...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 19996
result:
ok Number of moves = 19996
Test #143:
score: 9
Accepted
time: 34ms
memory: 9700kb
input:
20000 19999 2 6 7103 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 20001
result:
ok Number of moves = 20001
Test #144:
score: 9
Accepted
time: 20ms
memory: 9752kb
input:
20000 19999 2 6 9210 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 20000
result:
ok Number of moves = 20000
Test #145:
score: 9
Accepted
time: 30ms
memory: 9512kb
input:
20000 19999 2 6 6634 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13343
result:
ok Number of moves = 13343
Test #146:
score: 9
Accepted
time: 30ms
memory: 9512kb
input:
20000 19999 2 6 2832 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13336
result:
ok Number of moves = 13336
Test #147:
score: 9
Accepted
time: 30ms
memory: 9700kb
input:
20000 19999 2 6 5359 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13341
result:
ok Number of moves = 13341
Test #148:
score: 9
Accepted
time: 30ms
memory: 9516kb
input:
20000 19999 2 6 13535 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 11...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13340
result:
ok Number of moves = 13340
Test #149:
score: 9
Accepted
time: 32ms
memory: 9440kb
input:
20000 19999 2 6 9129 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 112...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13333
result:
ok Number of moves = 13333
Test #150:
score: 9
Accepted
time: 30ms
memory: 9700kb
input:
20000 19999 2 6 19461 19022 19751 10701 17954 2100 9336 1160 18064 778 9780 8724 19686 2324 4646 14044 18168 515 4837 5261 11443 1588 4784 7699 8137 1096 11339 10271 10769 16608 18983 2063 13987 15521 16324 147 13054 6200 13335 7389 19253 13536 17226 13270 13559 11043 16012 9696 18290 11726 14467 11...
output:
0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 13338
result:
ok Number of moves = 13338
Test #151:
score: 9
Accepted
time: 20ms
memory: 8820kb
input:
19998 19997 2 6 4130 4877 19953 13529 14984 14100 15420 9282 14188 2001 16271 1782 12862 10950 11464 9961 12125 1171 18068 15431 18253 1769 4672 18125 18809 14738 15356 3936 15229 4438 16461 225 19193 3682 11771 1339 11751 9959 9975 10113 12954 2025 18259 4223 17377 1062 16024 10468 16863 13106 1334...
output:
1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 28
result:
ok Number of moves = 28
Test #152:
score: 9
Accepted
time: 20ms
memory: 8772kb
input:
19998 19997 2 6 2158 4877 19953 13529 14984 14100 15420 9282 14188 2001 16271 1782 12862 10950 11464 9961 12125 1171 18068 15431 18253 1769 4672 18125 18809 14738 15356 3936 15229 4438 16461 225 19193 3682 11771 1339 11751 9959 9975 10113 12954 2025 18259 4223 17377 1062 16024 10468 16863 13106 1334...
output:
1 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 29
result:
ok Number of moves = 29
Test #153:
score: 9
Accepted
time: 14ms
memory: 8988kb
input:
19998 19997 2 6 6952 658 842 2047 12318 321 15247 51 14027 7026 15800 13828 16751 2266 14771 2721 12904 5447 14908 12329 14769 10611 16569 732 13399 1505 10499 11212 16298 11836 15509 3061 10513 2864 11586 3096 5065 14156 18830 12649 15890 16628 17695 3054 15041 6075 8744 3643 5627 13370 18375 2588 ...
output:
1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2002
result:
ok Number of moves = 2002
Test #154:
score: 9
Accepted
time: 14ms
memory: 8912kb
input:
19998 19997 2 6 7219 658 842 2047 12318 321 15247 51 14027 7026 15800 13828 16751 2266 14771 2721 12904 5447 14908 12329 14769 10611 16569 732 13399 1505 10499 11212 16298 11836 15509 3061 10513 2864 11586 3096 5065 14156 18830 12649 15890 16628 17695 3054 15041 6075 8744 3643 5627 13370 18375 2588 ...
output:
1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 2003
result:
ok Number of moves = 2003
Test #155:
score: 9
Accepted
time: 28ms
memory: 9248kb
input:
19998 19997 2 6 1634 661 15412 4259 15930 9250 12117 11546 16855 3107 11886 8384 15550 7061 14628 12141 19434 3970 13952 11685 14383 11257 17619 5475 8655 9733 17188 16950 18013 3340 11425 2641 6041 1900 14129 2542 11835 5053 9395 1987 6257 6030 8751 1617 8850 16536 18128 11014 19456 5866 7655 4234 ...
output:
0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10011
result:
ok Number of moves = 10011
Test #156:
score: 9
Accepted
time: 28ms
memory: 9252kb
input:
19998 19997 2 6 8520 661 15412 4259 15930 9250 12117 11546 16855 3107 11886 8384 15550 7061 14628 12141 19434 3970 13952 11685 14383 11257 17619 5475 8655 9733 17188 16950 18013 3340 11425 2641 6041 1900 14129 2542 11835 5053 9395 1987 6257 6030 8751 1617 8850 16536 18128 11014 19456 5866 7655 4234 ...
output:
0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10006
result:
ok Number of moves = 10006
Test #157:
score: 9
Accepted
time: 20ms
memory: 9368kb
input:
19998 19997 2 6 5109 14605 16057 4804 10287 5311 12861 12333 16827 12334 14952 2424 8025 14077 19700 18653 19520 8630 9493 2956 11187 6319 18220 11513 18100 10247 16636 1871 4281 8245 19244 1167 5277 5427 11021 19733 19824 18473 18489 1807 6602 5371 17697 8750 9872 2570 7862 3565 9650 10059 11151 46...
output:
0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10242
result:
ok Number of moves = 10242
Test #158:
score: 9
Accepted
time: 28ms
memory: 9348kb
input:
19998 19997 2 6 17145 14605 16057 4804 10287 5311 12861 12333 16827 12334 14952 2424 8025 14077 19700 18653 19520 8630 9493 2956 11187 6319 18220 11513 18100 10247 16636 1871 4281 8245 19244 1167 5277 5427 11021 19733 19824 18473 18489 1807 6602 5371 17697 8750 9872 2570 7862 3565 9650 10059 11151 4...
output:
0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 10243
result:
ok Number of moves = 10243
Test #159:
score: 9
Accepted
time: 20ms
memory: 8680kb
input:
20000 19999 2 6 19120 4805 6873 235 17151 11255 13221 551 3020 1594 14042 2359 7815 7132 12522 4718 6455 2004 18795 2772 16380 13309 15497 7512 19215 309 8992 4574 9006 9131 19467 14410 17735 1768 15599 8347 14339 2236 16408 8034 10487 6297 9026 14065 16193 9658 15443 32 19055 2018 16490 13858 15636...
output:
0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 0 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 59
result:
ok Number of moves = 59
Test #160:
score: 9
Accepted
time: 20ms
memory: 8668kb
input:
20000 19999 2 6 9851 4805 6873 235 17151 11255 13221 551 3020 1594 14042 2359 7815 7132 12522 4718 6455 2004 18795 2772 16380 13309 15497 7512 19215 309 8992 4574 9006 9131 19467 14410 17735 1768 15599 8347 14339 2236 16408 8034 10487 6297 9026 14065 16193 9658 15443 32 19055 2018 16490 13858 15636 ...
output:
0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 0 0 0 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 60
result:
ok Number of moves = 60
Test #161:
score: 9
Accepted
time: 14ms
memory: 8980kb
input:
20000 19999 2 6 5330 4683 10327 15023 17287 15705 16925 4020 11662 1158 9795 1613 13353 2432 7700 10952 18223 5990 6472 1330 8234 19008 19360 1567 14247 162 10436 2005 15140 15101 15995 8777 10375 2885 15510 5979 17404 1457 10560 1599 14929 3 4831 13279 13790 12437 18960 12200 19771 3042 5300 7812 1...
output:
0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 2136
result:
ok Number of moves = 2136
Test #162:
score: 9
Accepted
time: 18ms
memory: 8980kb
input:
20000 19999 2 6 3685 4683 10327 15023 17287 15705 16925 4020 11662 1158 9795 1613 13353 2432 7700 10952 18223 5990 6472 1330 8234 19008 19360 1567 14247 162 10436 2005 15140 15101 15995 8777 10375 2885 15510 5979 17404 1457 10560 1599 14929 3 4831 13279 13790 12437 18960 12200 19771 3042 5300 7812 1...
output:
0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 ...
input:
Interaction has been finished!
output:
Number of moves = 2439
result:
ok Number of moves = 2439
Test #163:
score: 9
Accepted
time: 28ms
memory: 9252kb
input:
20000 19999 2 6 10722 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 11...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9007
result:
ok Number of moves = 9007
Test #164:
score: 9
Accepted
time: 20ms
memory: 9128kb
input:
20000 19999 2 6 11960 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 11...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9002
result:
ok Number of moves = 9002
Test #165:
score: 9
Accepted
time: 20ms
memory: 9192kb
input:
20000 19999 2 6 7083 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 118...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9009
result:
ok Number of moves = 9009
Test #166:
score: 9
Accepted
time: 26ms
memory: 9244kb
input:
20000 19999 2 6 4912 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 118...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9010
result:
ok Number of moves = 9010
Test #167:
score: 9
Accepted
time: 12ms
memory: 9248kb
input:
20000 19999 2 6 8136 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 118...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9005
result:
ok Number of moves = 9005
Test #168:
score: 9
Accepted
time: 18ms
memory: 9200kb
input:
20000 19999 2 6 4286 9507 12308 7685 12312 9404 18940 1290 3863 6814 8079 17028 19136 17099 18927 16162 17428 2368 15620 5503 9221 9064 19600 1451 10182 5859 19220 5962 10109 7810 12139 9214 16571 2401 4296 5060 8085 6123 13095 8733 9482 2324 16047 12240 14309 3807 6419 9593 12956 8560 9631 2979 118...
output:
0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 ...
input:
Interaction has been finished!
output:
Number of moves = 9012
result:
ok Number of moves = 9012
Test #169:
score: 9
Accepted
time: 30ms
memory: 9504kb
input:
20000 19999 2 6 10055 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 189...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13248
result:
ok Number of moves = 13248
Test #170:
score: 9
Accepted
time: 24ms
memory: 9520kb
input:
20000 19999 2 6 2846 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 1897...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13249
result:
ok Number of moves = 13249
Test #171:
score: 9
Accepted
time: 30ms
memory: 9516kb
input:
20000 19999 2 6 9716 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 1897...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13244
result:
ok Number of moves = 13244
Test #172:
score: 9
Accepted
time: 30ms
memory: 9460kb
input:
20000 19999 2 6 5112 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 1897...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 14002
result:
ok Number of moves = 14002
Test #173:
score: 9
Accepted
time: 14ms
memory: 9512kb
input:
20000 19999 2 6 7966 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 1897...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13997
result:
ok Number of moves = 13997
Test #174:
score: 9
Accepted
time: 18ms
memory: 9448kb
input:
20000 19999 2 6 6899 1910 11260 2223 12775 9521 15070 13347 17120 3888 7028 9226 14879 11432 13815 8302 11594 5417 17628 611 7823 9132 19756 11462 18548 8594 11585 12247 19496 1492 6610 2622 6455 1089 10893 2997 9416 16032 16721 3647 5710 4099 8504 7576 11253 7815 19456 4754 10488 1670 6593 268 1897...
output:
1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 14004
result:
ok Number of moves = 14004
Test #175:
score: 9
Accepted
time: 26ms
memory: 9244kb
input:
19999 19998 2 6 3010 7208 8978 6357 17023 1015 16851 13939 19526 15936 19773 6437 14564 2048 3781 7789 15056 517 14985 9565 9644 8693 16341 2938 17686 1984 12560 4807 16715 6454 7751 8583 10409 10599 11704 9904 19646 15963 15987 146 9457 1234 8788 7080 7208 9340 18004 3873 19956 14217 16540 7722 113...
output:
1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 7017
result:
ok Number of moves = 7017
Test #176:
score: 9
Accepted
time: 26ms
memory: 9240kb
input:
19999 19998 2 6 12229 7208 8978 6357 17023 1015 16851 13939 19526 15936 19773 6437 14564 2048 3781 7789 15056 517 14985 9565 9644 8693 16341 2938 17686 1984 12560 4807 16715 6454 7751 8583 10409 10599 11704 9904 19646 15963 15987 146 9457 1234 8788 7080 7208 9340 18004 3873 19956 14217 16540 7722 11...
output:
1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 7018
result:
ok Number of moves = 7018
Test #177:
score: 9
Accepted
time: 26ms
memory: 8916kb
input:
19999 19998 2 6 13659 7208 8978 6357 17023 1015 16851 13939 19526 15936 19773 6437 14564 2048 3781 7789 15056 517 14985 9565 9644 8693 16341 2938 17686 1984 12560 4807 16715 6454 7751 8583 10409 10599 11704 9904 19646 15963 15987 146 9457 1234 8788 7080 7208 9340 18004 3873 19956 14217 16540 7722 11...
output:
1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 5006
result:
ok Number of moves = 5006
Test #178:
score: 9
Accepted
time: 16ms
memory: 9244kb
input:
19999 19998 2 6 13880 7208 8978 6357 17023 1015 16851 13939 19526 15936 19773 6437 14564 2048 3781 7789 15056 517 14985 9565 9644 8693 16341 2938 17686 1984 12560 4807 16715 6454 7751 8583 10409 10599 11704 9904 19646 15963 15987 146 9457 1234 8788 7080 7208 9340 18004 3873 19956 14217 16540 7722 11...
output:
1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 8004
result:
ok Number of moves = 8004
Test #179:
score: 9
Accepted
time: 22ms
memory: 9124kb
input:
19999 19998 2 6 16769 4231 15743 1926 5594 2239 19592 7148 8605 13090 17277 7110 19686 352 12146 18584 19895 1192 18307 17459 18744 13728 14537 9310 11132 450 18145 8512 15568 6041 8351 8475 9762 944 18832 15416 15574 105 16642 3188 13558 2890 19601 5735 5780 2353 14482 4738 7748 7741 19894 8014 820...
output:
0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 13
result:
ok Number of moves = 13
Test #180:
score: 9
Accepted
time: 22ms
memory: 8984kb
input:
19999 19998 2 6 523 4231 15743 1926 5594 2239 19592 7148 8605 13090 17277 7110 19686 352 12146 18584 19895 1192 18307 17459 18744 13728 14537 9310 11132 450 18145 8512 15568 6041 8351 8475 9762 944 18832 15416 15574 105 16642 3188 13558 2890 19601 5735 5780 2353 14482 4738 7748 7741 19894 8014 8209 ...
output:
0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 14
result:
ok Number of moves = 14
Test #181:
score: 9
Accepted
time: 0ms
memory: 8988kb
input:
19997 19996 2 6 15251 9849 17565 2236 5372 26 12502 10735 16498 11580 17806 2077 12500 7026 14479 7467 10856 967 9542 4354 7980 3157 7788 2201 5155 3569 9170 3159 5623 3746 17563 15872 16662 18042 18801 6347 7315 13814 18605 6771 10011 3652 4696 5532 16686 17732 19943 299 10938 5835 9787 5126 5403 1...
output:
1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 27
result:
ok Number of moves = 27
Test #182:
score: 9
Accepted
time: 14ms
memory: 9172kb
input:
19997 19996 2 6 7111 9849 17565 2236 5372 26 12502 10735 16498 11580 17806 2077 12500 7026 14479 7467 10856 967 9542 4354 7980 3157 7788 2201 5155 3569 9170 3159 5623 3746 17563 15872 16662 18042 18801 6347 7315 13814 18605 6771 10011 3652 4696 5532 16686 17732 19943 299 10938 5835 9787 5126 5403 11...
output:
1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 ...
input:
Interaction has been finished!
output:
Number of moves = 28
result:
ok Number of moves = 28
Test #183:
score: 9
Accepted
time: 22ms
memory: 8984kb
input:
19995 19994 2 6 3404 8865 9209 2968 17040 5854 8049 9791 17205 7167 12741 1614 10281 16461 19658 12322 18590 1598 11769 2528 7782 9785 15962 2374 7922 9082 18451 224 18990 4277 19857 7586 11411 6203 19140 2563 6849 11728 17324 5836 6436 9913 10126 6279 19352 9468 15927 1479 5668 11896 12781 1810 701...
output:
0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 11
result:
ok Number of moves = 11
Test #184:
score: 9
Accepted
time: 22ms
memory: 8956kb
input:
19995 19994 2 6 14055 8865 9209 2968 17040 5854 8049 9791 17205 7167 12741 1614 10281 16461 19658 12322 18590 1598 11769 2528 7782 9785 15962 2374 7922 9082 18451 224 18990 4277 19857 7586 11411 6203 19140 2563 6849 11728 17324 5836 6436 9913 10126 6279 19352 9468 15927 1479 5668 11896 12781 1810 70...
output:
0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 16
result:
ok Number of moves = 16
Test #185:
score: 9
Accepted
time: 24ms
memory: 8932kb
input:
19993 19992 2 6 17135 6807 11138 1797 14417 8947 13019 1173 2014 301 4061 11291 14649 1488 16624 10098 18172 9445 17869 12084 12375 6283 11709 2052 18561 1265 12166 8568 9232 3318 10081 1096 10662 1252 19130 2204 11684 7500 15084 4014 7294 8071 12249 6912 14461 5450 16614 2024 17852 11594 18355 1369...
output:
0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 42
result:
ok Number of moves = 42
Test #186:
score: 9
Accepted
time: 22ms
memory: 8992kb
input:
19993 19992 2 6 16018 6807 11138 1797 14417 8947 13019 1173 2014 301 4061 11291 14649 1488 16624 10098 18172 9445 17869 12084 12375 6283 11709 2052 18561 1265 12166 8568 9232 3318 10081 1096 10662 1252 19130 2204 11684 7500 15084 4014 7294 8071 12249 6912 14461 5450 16614 2024 17852 11594 18355 1369...
output:
0 1 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 39
result:
ok Number of moves = 39
Test #187:
score: 9
Accepted
time: 22ms
memory: 8908kb
input:
19993 19992 2 6 6720 6766 13348 6533 9507 7105 9396 4320 18568 5471 10824 6924 11868 1499 3143 1121 15424 4755 9445 4994 16107 5875 6058 7731 11786 4727 13169 3084 8001 4791 7406 4290 16843 12689 17540 11512 19685 390 13872 9 5646 7865 13193 12581 15738 6152 9475 5396 19732 13577 19284 8287 19532 16...
output:
0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 44
result:
ok Number of moves = 44
Test #188:
score: 9
Accepted
time: 22ms
memory: 8980kb
input:
19993 19992 2 6 18856 6766 13348 6533 9507 7105 9396 4320 18568 5471 10824 6924 11868 1499 3143 1121 15424 4755 9445 4994 16107 5875 6058 7731 11786 4727 13169 3084 8001 4791 7406 4290 16843 12689 17540 11512 19685 390 13872 9 5646 7865 13193 12581 15738 6152 9475 5396 19732 13577 19284 8287 19532 1...
output:
0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 ...
input:
Interaction has been finished!
output:
Number of moves = 45
result:
ok Number of moves = 45
Extra Test:
score: 0
Extra Test Passed