QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#945389#10243. Opieka [A]QZJ12345610 ✓1809ms378544kbC++143.4kb2025-03-20 21:14:042025-03-20 21:14:04

Judging History

This is the latest submission verdict.

  • [2025-03-20 21:14:04]
  • Judged
  • Verdict: 10
  • Time: 1809ms
  • Memory: 378544kb
  • [2025-03-20 21:14:04]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
int T,n,L;
char str[21][100005];
bool mark[21][1800005];
int go[21][1800005],lst[1800005][21];
int ct[1800005];
struct frc{
	int fz,fm; 
}arr[20000005];
bool cmp(frc x,frc y){
	return x.fz*y.fm<y.fz*x.fm;
}
int tot;
bool fl;
vector<int>tmp;
int id[1800005];
bool vst[25]; 
void dfs(int now,int lt,int len,int m){
	if(now>n){
		fl=1;
		return;
	}
	if(fl)return;
	int tt=0;int pos[55]={},su[55]={};
	for(auto to:tmp)id[to]=id[to+len]=0;
	pos[++tt]=1,pos[++tt]=m+1;
	for(auto to:tmp)pos[++tt]=to,pos[++tt]=to+len;
	sort(pos+1,pos+1+tt);
	tt=unique(pos+1,pos+1+tt)-pos-1;
	for(int i=1;i<=tt;i++)su[i]=0,id[pos[i]]=i;
	for(auto to:tmp)su[id[to]]++,su[id[to+len]]--;
	for(int i=1;i<=tt;i++)su[i]+=su[i-1];
	int mn=1e9,scmn=1e9,p1=0,p2=0;
	for(int i=1;i<=n;i++){
		if(vst[i])continue;
		int gp=go[i][lt];
		if(gp==1e9)return;
		if(gp<scmn)scmn=gp,p2=i;
		if(mn>scmn)swap(mn,scmn),swap(p1,p2);
	}
	if(p1){
		int fn=0;int cr=mn+len-1;
		for(int i=1;i<tt;i++){
			int pr=min(pos[i+1]-1,cr);
			if(pos[i]>cr)break;
			int pid=lst[pr][su[i]+2];
			fn=max(fn,pid);
		}
		tmp.push_back(mn);
		vst[p1]=1;
		if(fn>=mn)dfs(now+1,max(lt,fn+1),len,m);
		else dfs(now+1,lt,len,m);
		tmp.pop_back();
		vst[p1]=0;
	}
	if(p2){
		int fn=0;int cr=scmn+len-1;
		for(int i=1;i<tt;i++){
			int pr=min(pos[i+1]-1,cr);
			if(pos[i]>cr)break;
			int pid=lst[pr][su[i]+2];
			fn=max(fn,pid);
		}
		tmp.push_back(scmn);
		vst[p2]=1;
		if(fn>=scmn)dfs(now+1,max(lt,fn+1),len,m);
		else dfs(now+1,lt,len,m); 
		tmp.pop_back();
		vst[p2]=0;
	}
}
int bel[1800005];
bool ck(int mid){
	int d=arr[mid].fm;mid=arr[mid].fz;
	for(int i=1;i<=L*d;i++)ct[i]=0,bel[i]=(i-1)/d+1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=L*d;j++){
			mark[i][j]=(str[i][bel[j]]!='X');
			ct[j]+=mark[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		int nxt=L*d+1;
		go[i][L*d+1]=1e9;
		for(int j=L*d;j;j--){
			if(!mark[i][j]||ct[j]==1)nxt=j;
			if(nxt>=j+mid)go[i][j]=j;
			else go[i][j]=go[i][j+1];
		}
	}
	memset(vst,0,sizeof vst);
	for(int i=0;i<=n;i++)lst[0][i]=0;
	for(int i=1;i<=L*d;i++){
		for(int j=0;j<=n;j++)lst[i][j]=lst[i-1][j];
		lst[i][ct[i]]=i;
	}
	fl=0;
	dfs(1,1,mid,d*L);
	return fl;
}
int main(){
	T=1;
	arr[0].fm=1;
	while(T--){
		scanf("%d%d",&n,&L);
		for(int i=1;i<=n;i++)scanf("%s",str[i]+1);
		bool fl=1;
		for(int i=1;i<=L;i++)ct[i]=0; 
		for(int i=1;i<=n;i++){
			for(int j=1;j<=L;j++){
				mark[i][j]=(str[i][j]!='X');
				ct[j]+=mark[i][j];
			}
		}
		for(int i=1;i<=L;i++){
			if(!ct[i])fl=0;
		}
		if(!fl){
			puts("-1");
			continue;
		}
		tot=0;
		for(int d=1;d<=1;d++){
			for(int i=1;i<=d*L;i++){
				if(__gcd(i,d)==1)arr[++tot].fz=i,arr[tot].fm=d;
			}
		}
		sort(arr+1,arr+1+tot,cmp);
		int L=1,R=tot,ans=0;
		while(L<=R){
			int mid=L+R>>1;
			if(ck(mid))ans=mid,L=mid+1;
			else R=mid-1;
		}
		frc tm=arr[ans],tm1=arr[ans];tm1.fz++; 
		for(int d=2;d<=n;d++){
			for(int i=1;i<=d*L;i++){
				if(__gcd(i,d)==1)arr[++tot].fz=i,arr[tot].fm=d;
			}
		}
		sort(arr+1,arr+1+tot,cmp);
		for(int i=1;i<=tot;i++){
			if(arr[i].fz==tm.fz&&arr[i].fm==tm.fm)L=i+1;
			R=i;
			if(arr[i].fz==tm1.fz&&arr[i].fm==tm1.fm)break;
		}
		ans=L-1;
		while(L<=R){
			int mid=L+R>>1;
			if(ck(mid))ans=mid,L=mid+1;
			else R=mid-1;
		}
		printf("%d/%d\n",arr[ans].fz,arr[ans].fm);
	}
	return 0;
}

詳細信息

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 2ms
memory: 18232kb

input:

1 1
.

output:

0/1

result:

ok single line: '0/1'

Test #2:

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

input:

5 100
....X..XXX........X.XX.X...............XX..............X....................X.....X.........XXXX.XX.
....X..X..........X.X..........X...................................X.......X..X.........X.....X....X
....X..X.....X....X.X.X................XX................X..X..................................

output:

73/4

result:

ok single line: '73/4'

Test #3:

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

input:

5 100
.....X....X.....X...X.....X.XX...X.....X.X.X..XXX.....XX.X....XXXXX...........XX...X.XXX...XX.....X.
..XX.....X.X.....XX.....XX.....XXXXXX....X.......X....X.........XX....XX.....X....X......X.X..X.....
.X..X..X.....X....X..X.....X..X...XX.....X.X..XXX........X.....XX........X...X.....X.XX....X...

output:

29/5

result:

ok single line: '29/5'

Test #4:

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

input:

5 100
...X......X.......................X..................X.........X...............................X....
...X..................X...............................X.........X.................X.................
...X.............................X...............................................X.............

output:

91/3

result:

ok single line: '91/3'

Test #5:

score: 1
Accepted
time: 2ms
memory: 32468kb

input:

5 100
........X.................X..........................X.......................X......................
......................X....XX.........................X......................X......................
..X.........................XX......................X..X.....................X.................

output:

49/2

result:

ok single line: '49/2'

Test #6:

score: 1
Accepted
time: 2ms
memory: 34520kb

input:

5 100
..XX...X.XX..XX..XXXXXX.X.X..X..X..XX.X.XXX.XXX..XX..X..XXXXXXX.X.X..X..XX..XX..X.X...XX.X.X.X.XX...
..X.X.X..X...X.X..X..X..XXXX.XXXXXXXXXXX....XX..XXXX..X..X.X..XX.XX..XX..X.X.XX..X..X.X.X...XXX...X.
.X...XX..XX..X..X..X.X..XXX..X..XX.XXXX..XX..X.X..XX..X.....X..XX..X.X.X....XX.X.XX.X.X..XX....

output:

3/1

result:

ok single line: '3/1'

Test #7:

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

input:

5 100
..X.XX.....X..X..X..X..X.X..XX..X.XX..X..XX..XX..X.XXX..X..X.X.X.X.XXX..X.X....X.X.X.XX...X.XXXXXX..
.X...XX..X..X..X.X.X..XX..X..X..X..X..X.XX..X.X.X.X.X..XX..X.X..X..X..XX....X.X..X..XXX..X..X..X.XX.
...XX.X.XX..XXX.....XXXX.XX..X.X.X..XX.X.X.X..X..X..X..XX....X..XXXX..X..XX.X.X.....XXX..X.X...

output:

5/2

result:

ok single line: '5/2'

Test #8:

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

input:

5 100
.......X....X......X......X....X......X...X.......X......X.....X.....X.....X.....X.....X....X.......
......X....X............X.....X...X......XX.....X.X......X.....X.....X....X.......X....X.....X......
......X.....X......X......X......X.X............X.X......X.....X....X.......X...X.......X......

output:

7/1

result:

ok single line: '7/1'

Test #9:

score: 1
Accepted
time: 4ms
memory: 34524kb

input:

5 100
.......X....X......XX.....X.....X......X..X......X.....X..X...X......X.....X.....X.....X....X.......
......X.....X......X......X.....X..X......X......XX...................X....X.....X....X.......X.....
......X.....X......XX.....X.....X....X.....X.....X.X......X...X.....X.......X...X.......X......

output:

13/2

result:

ok single line: '13/2'

Test #10:

score: 1
Accepted
time: 2ms
memory: 28336kb

input:

4 20
....................
......X.............
...............X....
...........X........

output:

10/1

result:

ok single line: '10/1'

Test #11:

score: 1
Accepted
time: 2ms
memory: 12012kb

input:

1 1
X

output:

-1

result:

ok single line: '-1'

Test #12:

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

input:

1 100
....................................................................................................

output:

0/1

result:

ok single line: '0/1'

Test #13:

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

input:

5 1
.
.
.
.
.

output:

1/2

result:

ok single line: '1/2'

Test #14:

score: 1
Accepted
time: 3ms
memory: 32464kb

input:

5 100
....................................................................................................
....................................................................................................
...............................................................................................

output:

50/1

result:

ok single line: '50/1'

Test #15:

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

input:

5 100
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #16:

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

input:

4 8
.X.X..X.
.XX..X.X
X...XXXX
.XXX....

output:

3/2

result:

ok single line: '3/2'

Test #17:

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

input:

3 19
X...X..........XX..
...X.X............X
...................

output:

9/1

result:

ok single line: '9/1'

Test #18:

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

input:

2 100
XX......XXXX........X.X..X.....XX..X..XXX.X.XX.X....X.XXX..X.XX...XXX.XX.X.XX.....X.....X.XXXX....X.
.................X.X......XX..X..XX.X....X.X....XX.......X.....X.X...X....X..X........X..X......X...

output:

5/1

result:

ok single line: '5/1'

Test #19:

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

input:

5 99
.XXX....X.X...XX...XX.....X..XXX..XXX.....XX.XXX...X.X..X.XX.X..X.XXXXX.X.X.X.XX.X.XXX...XXX....X..
XX...X.XXX.X.X.XXXX......XXX...XXXXXX.X.XXX..X...XX.X.XX...XXX.XX.X...X.....XXX.XXX.XXX...XXXX.XX.X
XX.X.XXXX..XXX..XXXX..XXX.XX..X....X..XXXX....X.X.....XX..X....X..X..XX..XX........X..XXX.XXX.X...

output:

4/1

result:

ok single line: '4/1'

Test #20:

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

input:

5 100
XXX...XX..X.....XXX.....X.X..X.XX.X....X...XX.XXXXXXXXX.X..XX.X....X..XX.XX.X.XX.X.XXX..X.X.X..XXXX.
.XX..XXXXXX.XXX.XX.X..X..X..XXX..X..XXXXXXXX.X...XX..XX..XXXX.X.X..XXXX...X.X..X.XX..XX...X.X.X..X..
XXX.XXXX.XX.XX.X.X.X.X..X....X.XXX...X..XX.XX...X........XXX.XXXX...X.....X.X.......X..X.XX....

output:

-1

result:

ok single line: '-1'

Test #21:

score: 1
Accepted
time: 2ms
memory: 32620kb

input:

5 100
XX.....XX.X...X.XXX.XX..X....XXX.XXX.X.XXXX.X..XXX.X.XX..XX....XX..XX......XX.XX..X.XXX.XX.XX.XX..X.
XXXXXXXX.X.XXXXXX..XX.XXXXXXX..XX.X.X.X....X.XX..XX.X..XXX.XXXXX.XX.XXXXXXXX.X..XX.XXX.XXXXXXXX.XX.X
XXXXXXXXXX.XXX.X.X.X.XXXXXXXXXXXX...XXX..X.XXXX.X.X.X..XX.XXXXX.XXX.XXXXXXX..XX.XXXX.X.X..X....

output:

0/1

result:

ok single line: '0/1'

Test #22:

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

input:

5 100
XXXXXXXXXXX.XXXXXXX..X..XXXX.X.XXX....X..XXXXXXX.X.X.X..XXXXXXX..X.XXXXXXX.XXXXXX.XXX....X.XXXX.X.X.
XX.XXXXXX..X.XX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XX.XXXXXXXX..X.X.XXXXXX..XXXXXXXXXX.XXXXX
XXX..XX.XXXXX.XXX.XXXXXX.XXXXXXXXXXXXXXXX..XXXXXX.XXXXXX..XXXXXXXXXXX.XXXXXXXX..XXXX.XXXXXX....

output:

0/1

result:

ok single line: '0/1'

Test #23:

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

input:

5 100
X.XXXXXX.XXXXXX.X.X.XXXXXXXXXXX.XXX.XXXXXX..X.XXX.XXXXX..........X.XXXXXX.XX..XXXXX..........XX..X.X
XXXXX.X.XX.XXXXXXXXXXXXXXX.........XXXXX..........XXXXXXXXXXXXXXXXXX.X.X.XX.XXX.X.XXXXXX.XXXXX.XXXX.
XX.X...........X.X.X..........XXXXXXX....XXXXX.XXX......XXXX...XX.XXXX..........XX..X.X.XXXX...

output:

9/1

result:

ok single line: '9/1'

Test #24:

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

input:

5 100
..XX...........X.X.X..........XXXXX..XXX.XX..XXXX.XX.X.XXXX.XXXXXXX..X..........XXXXXXXX.XXXXXXX.X..
XXXXXXXXX.XXXXX.XXXX.X..XXXX.XXX...........XX.XX.........XXXX.X.........XXX..XXXXX.XXXXXX..XXXXXXXXX
XXX.X.XXXXXX.XXXXXXXXXXXXX..XXXXXXXXX.XXXXXXXX..XX..XXX..........XXXX..X.XXXXXXX.XX............

output:

17/2

result:

ok single line: '17/2'

Test #25:

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

input:

5 99
....X...........X........X......X........XX.........X.......X......X..............X.....X..........
....X...........X........X......X........XX.....X...............X.....X........X........X..........
....X...........X...X..............X.....XX.........X.......X.........X........X........X.........

output:

12/1

result:

ok single line: '12/1'

Test #26:

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

input:

5 99
....X...........X...X..............X.....X..........X.......X.........X.......X...........X........
....X...........X....XXXXXXX....X........X......X...............X.....X.......X...........X........
...................X.XXXXXXX.X..............X.......X.......X.........X.....X.....................

output:

23/2

result:

ok single line: '23/2'

Test #27:

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

input:

5 100
.....X..........X............X......X.......X.......X............X....X.........XX........X.........
.....X...............X......X.......X.......X........X....X.................X...XX........X.........
.................X..........X.......X.....X.............X..XXXXXX....X............X.......X....

output:

12/1

result:

ok single line: '12/1'

Test #28:

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

input:

5 100
....................X........X.....X.........X........XXX..X...............X......X...........X..X..
......X...........X..........X....X............X......XXX...XXXXXXX...X............X..........X..X..
......X..........X............X....X.......X.............X..XXXXXXX....X..........X............

output:

23/2

result:

ok single line: '23/2'

Test #29:

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

input:

5 98
....X.......X....XX....X.XX......X..X.......X......XX..X.X................X.....X......XXX..X..XXX
..X...........X..XX......XX.X.......X...X...............X.....X......X.....X....X..X........X..X..
..X...........X..............XXX....XX.X..XXX......XXXXX.XXXX.X......X.......X..................X...

output:

12/1

result:

ok single line: '12/1'

Test #30:

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

input:

5 98
..XXXX.XXX.......X.......XXXX.XXXX.............X.....X....XX.............XX........X..X...........
.........X.......X.....X................X....X.......X.....XXXXXX....X.X..XX.......X.......X......
XX.X..........XX.X.......XXXXX.....X....XX...............X..XXXXX......X....X.XXXX.X.......XX.X.X...

output:

23/2

result:

ok single line: '23/2'

Test #31:

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

input:

5 100
XX.X....X.......X......X..........XXXXXX..........X.XX...XX..X..X.X..X....XXX..X..X.......X...X.....
.XXXX.X.XXX.X.X....X....XX......X.X.......XX..XXXX...........X..X............X...XX.......X.......X.
X.X......X.......X.........X....X..........X..XXXX...X...X.....XX.X......XX.....XXX......X.....

output:

8/1

result:

ok single line: '8/1'

Test #32:

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

input:

5 100
.X.X.XX.X......X.X.XX.XX.............XXX..........XX...XXXXXX.X.X.X.......X.......XXXX.....X...X....
XXXX..X....XXXX..X......XXX.....X...X...X.X.......XXX.X...........X..XX..XX.......XX....X.XX.......X
.X.....XXXXX.....X....X.XXX.X...XXXX...X..XXX....X...........X..X............X....X....X.......

output:

15/2

result:

ok single line: '15/2'

Test #33:

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

input:

5 100
X..XX.X.XX.XX..X.XXXX.XX..X.XX..X.X..X..X.X.X..X.X..XXXXXXX.X..X..X..X..XXX..X.X..X..XX......X..X.X.
X.XX.............XX..X...X....X.X.XXX...X.......X.X....X.X.X...X.....X..X.........XX...XX..XX.......
XXX..X..XX..XX..X.XXXX..XX..X.X.XXX.X.X..XXX..X.X..X.X.X.X.X.X.X.X.X..X.X..X..X.X..X.X....XX...

output:

8/3

result:

ok single line: '8/3'

Test #34:

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

input:

4 100
X..XX..X.X.....XXXX...........X..X.......XXXX.......X......X...XX.X.......X..X.....X.......XXX..X...
......X..XX.....XX.X......X.X............X..X.....XXXXXX.......XXX......X....X....X...X.X...........
......XXXX.XX...X..XX.............X..X.......X......X.X.XXXXX..XX.....X..X...X.X.......X.......

output:

22/3

result:

ok single line: '22/3'

Test #35:

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

input:

5 20
...X............XXX.
X.XXX.XXX.XX.XX..XXX
.X..XX.X.X.X.X.XXX..
.X.XXX.X.X.XX.X.X..X
.X.XX.X.XX.X.XXX..X.

output:

5/4

result:

ok single line: '5/4'

Subtask #2:

score: 1
Accepted

Test #36:

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

input:

6 1000
...XXXX.XXX..XXX......XX.XX..XXX....X...XX.X...XXXX.X.....XX.XX...XX..X.X...X..XXXXX.X...X.X.XX.XX..X........X....XXX.X..XXXXX.XX.X..X....XX..X...XXX..XXX..X.XX..X.X...XXXXX.XXXXXXX.XX..XX.X...X.XXXX.XXX..X...X.X.XX...XXX.XXX.X..X...X..XX.X....XXX.X.X.XXXX...X..XX.....X.X..XX.XX.X.XX..XX...XX...

output:

6/1

result:

ok single line: '6/1'

Test #37:

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

input:

6 1000
.X.................................XX..XXXX.X........X...................................................XX.X..X...X.X.........X.........X........X.................X...............................................................................................X..................XX......X........

output:

78/1

result:

ok single line: '78/1'

Test #38:

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

input:

6 1000
..XXX.........X...XXX.........X........X..........................X..........XX...X...........XX...X.................X...........................................X.......................X.XX...................X.XXXXXX...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................

output:

155/2

result:

ok single line: '155/2'

Test #39:

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

input:

6 997
.....X....XX........XX.........................................XX.X..............XXX.X..X.XX....X...XXX.X.....................................XX.......X.XX..........XX.....................................XX....X.......X.X...X...XXX...X.....XX.XXXX..X........................X.....X.........X......

output:

89/1

result:

ok single line: '89/1'

Test #40:

score: 1
Accepted
time: 3ms
memory: 38592kb

input:

6 997
............X.......................X..X.....X...........X..........................XX..X...X........................XX..X..X.XX..X.....XX............................XX...............................................XX..X.X.....XX......X.....XXX...............X........X................XXX..XX.....

output:

177/2

result:

ok single line: '177/2'

Test #41:

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

input:

6 1000
....................XX...............................................XX.XXX....................XXXXX.....XX.................X.........................X......XXXX...XX....XX....................XX..X..........................................................................X.........X..............

output:

51/1

result:

ok single line: '51/1'

Test #42:

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

input:

6 1000
............X............X..X............XX...X.X.XX....X......XXXXX..XXXX....XXX...XXXX....X...X..........X...............X................X..X...........................................................................X.X................X.X....X..X..........X..................X.................

output:

101/2

result:

ok single line: '101/2'

Test #43:

score: 1
Accepted
time: 5ms
memory: 36600kb

input:

6 1000
............XXXXX..................XXX............X..............XXX.....XX.X...X...........XX........X.X.......XXX.....XXX.XXX.............................X........X..................X........X...X..X.X......XXXX.X......X.....X.........X.XX..X..XX.X....XX...XX...XX..............................

output:

745/6

result:

ok single line: '745/6'

Test #44:

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

input:

6 1000
..X....................XX.........XX........XX.X...X..XX....X...........X.X..XXXX....X...XX.X..............................X....................X.X........XX...X...XXX.........XX...X.........X.....................XX.......................X.........X.....XX...............X.................X.X....

output:

529/2

result:

ok single line: '529/2'

Test #45:

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

input:

6 1000
X.......X..XX.........X.......XXX.....................................X..XX..X.X..XX............X........X.....................X.......XX.....XX..........X.XXXX........X................................................................X....XXX......X................................................

output:

495/2

result:

ok single line: '495/2'

Test #46:

score: 1
Accepted
time: 3ms
memory: 40668kb

input:

6 1000
..........................X...........................................................................................................................................................................................................................X.................................................

output:

875/4

result:

ok single line: '875/4'

Test #47:

score: 1
Accepted
time: 2ms
memory: 36740kb

input:

6 1000
..X.X.XX...XX..X..X..X..XX..X..X.XXX...XX..XX..X..X.X.....X.X..X.....X..X..X..XX..X.XX.....X..X..X..X..XX..X.X..X.X..X..XX..X....X..X..XX..X..X..X.X..X..X..X..X..X..XX.....XX...X.X..X..X.X.X..XX..X..XXX...X..X.XX..X.X.X..X..XX..X..XX.X.X.XX..X.X..X.X..X..X..XX..X.X...X..X.X.X.X..X.X..XX..X..X...

output:

3/1

result:

ok single line: '3/1'

Test #48:

score: 1
Accepted
time: 2ms
memory: 36736kb

input:

6 1000
..XX......X.X..X.X..X.X..X..X..X..X.X..X.X..XXX..X..X..XX.X..X..X..X.X..X..XX..X..X..X.X.X..X.X.....X..X..XX..X..X..X..X..X.X..X..X..X..X..XX..X.XX..X..XX..X.X.X.XXXX..X..X..X..X..XX..X...X..X.X..X.X..X.X..X..X.X..X..X..X.X..X..XX..X..X.X..X..X..XX..XX..XX..X..XX..XX..X.X..X..X..X..X.X..X..XX...

output:

5/2

result:

ok single line: '5/2'

Subtask #3:

score: 1
Accepted

Test #49:

score: 1
Accepted
time: 2ms
memory: 22260kb

input:

7 10000
..XXXX.XXX.X......X..XX.XX......XX.XX.X...X...X..X.XX........XXXX..X..X..X.X.XX.XX..XX..X...XXX.X.X.XXXX..X....X.X.X.X.....X..XX.XXX.X.X...XXXXX.XXX..X.XX...XX...X...X.XX.X...X.XX..X....XXX...X....XX........XXXXX...X..X....XXX...XXXX.X.X.X..XXXX....XX...X.X.XXX....XXXX.XX.X.X.XX..X.XXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #50:

score: 1
Accepted
time: 20ms
memory: 55404kb

input:

8 10000
XXX...X...XX.XX...X.X...XX..X...X.XX.X.X...X.X..X.XXXXX....X.X.X..XXXXXXXX...X..X..X.XXX.X.X...XXXXX..XX...X...X.X...X..X..X.XXX.X..X...XX....XX..X.X.X..XXXXX..X.XX...XX.....X.X.XXX...XXXXXX.XXXXXX.XX...XXX.X......XXX.XXXX........XXX..X.X..X......XXX...X..X...X.X.X...X...XX..XXXX..XX.X.X.X.....

output:

10/1

result:

ok single line: '10/1'

Test #51:

score: 1
Accepted
time: 11ms
memory: 53412kb

input:

8 10000
.........X.X.....XX.XX.........................X....................XXXXX..............................X...........X......X......X....................XX.....X.X.XXX...X.....X..X....................X.......................................X...X...X............X....................X.X.............

output:

649/1

result:

ok single line: '649/1'

Test #52:

score: 1
Accepted
time: 11ms
memory: 53348kb

input:

8 10000
...................XXXX.................X.........................X................XX...X....X..X......X...X.......XX..........X...XXXX..XX............X..XX......X....X.X.X..........X......X........X.....................X...........X...........................X..X..X..........XX..XXXX..........

output:

1297/2

result:

ok single line: '1297/2'

Test #53:

score: 1
Accepted
time: 10ms
memory: 53256kb

input:

8 9997
.....................................................................................................................................................................................................................................................................................X..................

output:

401/1

result:

ok single line: '401/1'

Test #54:

score: 1
Accepted
time: 18ms
memory: 57360kb

input:

8 9997
......................................................................................................................................................................................................X.................................................................................................

output:

400/1

result:

ok single line: '400/1'

Test #55:

score: 1
Accepted
time: 12ms
memory: 57364kb

input:

8 10000
....................X............XX...........................................................XXXX.X.XXXXXXXXX...............X....X......XX........X.....XX..................X........................................X...............X.........................XX........X.......................X....

output:

657/1

result:

ok single line: '657/1'

Test #56:

score: 1
Accepted
time: 12ms
memory: 57524kb

input:

8 10000
...................X.X..XXX....................................XX.X...............XXX...X.......................................X...........................X.XXX.............X..XXX..........X.....................................................................................XXXX........X......

output:

1313/2

result:

ok single line: '1313/2'

Test #57:

score: 1
Accepted
time: 9ms
memory: 51224kb

input:

8 8192
........................................................................................................................................................................................................................................................................................................

output:

6091/5

result:

ok single line: '6091/5'

Test #58:

score: 1
Accepted
time: 11ms
memory: 55456kb

input:

8 10000
....................................X..........X.X.X........X......................................XXX.......................X.XX.X....X.XXX.X.......................................................X.X...............................................................................................

output:

8921/3

result:

ok single line: '8921/3'

Test #59:

score: 1
Accepted
time: 13ms
memory: 57472kb

input:

8 10000
X....XX.X.X.XXXXXXXXX.XX.XX..XXXXXXXXXXXXX..XXXXXX.XX..XXXXX.XXXXXXXXXXXXX.XX.XX..XXXX.XXXX.XXX.X.XXXXXXXXXXXXXXXXXXXXXXXX.X.X.XX.XXX.XXXXXXXXXXX.XX.XXXXXXX...XXXXX.XXXXX..X..XXXXXX.X.XXXXXXXX.XXXXX.XX..XXXX.XX.XXXXXX.X.XXXX.XXXXXXX..XXX.XXXXXXXXXX..XXXX..XXX.XXX.XX.XXXXXXXXXXXXXXXXX.X..XXXX...

output:

9779/4

result:

ok single line: '9779/4'

Test #60:

score: 1
Accepted
time: 12ms
memory: 57424kb

input:

8 10000
..X.X.X.X.X.X..X..XX..X..X..XX..X..X..X..XX..X..XX..X.XX..X..X.X.X..X..XX..X..XX..XX..X.X.X..X..X..XXX..X..X..XX..XX..X.X..X..X..X..X..X..XX..X..XX..X..X.....X..X.X..X.X.X.X.X.X.X.X..X.X.X..X.X.XX..X.X..X.X..X..X..X..X...X.X..X..X..X..X..X..X..XX..X.X..X.X..X.X..X.X..X..X.X..XX..X..X..XX..X....

output:

3/1

result:

ok single line: '3/1'

Test #61:

score: 1
Accepted
time: 11ms
memory: 55336kb

input:

8 10000
..X.X.X.X.XX......X..X..X.X..X.X.....X..XX..X..X..X.X....X..X.X..XX..X..X..X..X..X..X.X..X.X..XX..X.X..XX.X..XX..XX.X..X..X.X..XX..X..X..X..X.X..X..XX.....X..X..X..X..X..X.X..X..X..XXX..X.X..X..X..X..X.X..X.X..X..X.X..X..XX..X..XX..XX..XX.X..X..X..X..X.....X..X..X..XX..X.X....X..X..X..XX..XX...

output:

5/2

result:

ok single line: '5/2'

Test #62:

score: 1
Accepted
time: 17ms
memory: 57432kb

input:

8 10000
XXXXXX..XX.XX.XX.X.XX.X.X.X.X.XXX.XX.X.XXXX.X.XX.XXX.XX...XXX.XXX.XXXXX.X.XX.X.XX.XXXX.X.XX.X.X.XX.XXXXX.XX.X.XX.X.XXX.X.XXXX.X.XX.X.XXX.XXXX.XX.X.X.X...X.XX.X.XXX.X.XX.X.X.XX.X.XX.X.XX.XXXX.XX.X.X...X.XX.X.X.X.X.X.XXX.X..XXXX.X.XXX..XXX.X.X.X.XXX.X.XX.X.XXX.X.X.X.X.X.X.XXX.X.X..XX.XX.XX.XXX...

output:

2/1

result:

ok single line: '2/1'

Test #63:

score: 1
Accepted
time: 10ms
memory: 55152kb

input:

8 10000
XXXX..XXXX.X.XXXX.XXX.X..XXXXX.X.X.XX.X.XX.XX.XX.XX.X.X.XX.XXX.XX.XXX.XX...XXX.XXXXX.X.XX.X.X.XXXX.XXX.XXX.X.X.X.X.XXXXXX...X.XXX.XXX.X.XXX.X.XXXXXX.X.XXXXXXX.XXX.X.XXX.XXXXXXX.XX.X.X.X.X.XX.XX.XXXX.X.XX.XXXX.XXXXXXXXX.X.XXXX.XX.XX.XX.X.X.X.XX.X.XX.XX.XX.XXXX.X.XX.XX.X.X.X.X...XXXX.XX.X..X.X...

output:

3/2

result:

ok single line: '3/2'

Subtask #4:

score: 1
Accepted

Test #64:

score: 1
Accepted
time: 75ms
memory: 91312kb

input:

10 30000
......................................................................................................................................................................................................................................................................................................

output:

15000/1

result:

ok single line: '15000/1'

Test #65:

score: 1
Accepted
time: 78ms
memory: 93296kb

input:

10 30000
...X..X..X.....X...X.....X.X...XXX.XX..XX.X......X.X.X.X..X..X.X.XXXX.XXXXX....XX......X....XXX.XX..X.XXX...X...X.X.X.XXX......XXX.X....X.....XXXXX......XX...XX.XXXX....X.X.X.....XXX.XX.X.X.X....XXX.X.X.XX.XXX....X.X.X....X.XX..XXX.XX...X.X...X.XXX.X.XX..XX.X..XX.X..XX..XX....X.X...XX.XXX.....

output:

13/1

result:

ok single line: '13/1'

Test #66:

score: 1
Accepted
time: 61ms
memory: 95236kb

input:

10 30000
................................................................X...............X............................................................................................XXX...............X...........X......X.XXX..................................X...X...XX.XXXX..X....X......................

output:

1594/1

result:

ok single line: '1594/1'

Test #67:

score: 1
Accepted
time: 64ms
memory: 94640kb

input:

10 30000
..X...X...........................X.XX.............................X.X....XX...XXXX...XX.X.....X.X...........XX..X...............X..XX..................X...................X..XX.......................................X..............XXX...................X..XX...XX.X.................XXXX........

output:

1543/1

result:

ok single line: '1543/1'

Test #68:

score: 1
Accepted
time: 56ms
memory: 94536kb

input:

10 29999
X.XXX...................................................X......XX........................X...................X.X.X.X..XXX.XX..X........................................................XXX........................X.........X..X.X..XXXXXX....................X.......................................

output:

1504/1

result:

ok single line: '1504/1'

Test #69:

score: 1
Accepted
time: 52ms
memory: 89120kb

input:

10 29999
......................................................................................XXXXX...................................X.........X...X...X...................................XXX......XXXX....XXX....X....X..............X...X.XX........X.X.X..X.......X..X............X...X..................

output:

3007/2

result:

ok single line: '3007/2'

Test #70:

score: 1
Accepted
time: 52ms
memory: 93368kb

input:

10 30000
XX.X.X..................................................XXXX.XXX......................................................................................XXX......XX..............XX....XX..XXX.XXXX....XX.XXXXX.X..X...XXXX.....................XX...X..XX..X......XXX...X.XXX....X....X..XX....XX.X....

output:

1731/10

result:

ok single line: '1731/10'

Test #71:

score: 1
Accepted
time: 50ms
memory: 91052kb

input:

10 30000
................X...X...X.....X................X......X.........XX.XXX.........................................................................XXXX............X...X...X..............XX..................X....X........................................................XX..............XX.XXX........

output:

1969/4

result:

ok single line: '1969/4'

Test #72:

score: 1
Accepted
time: 48ms
memory: 90540kb

input:

10 30000
.................X.X......X............X.X..X.............................................................................................XX..........................................XXX.XX......X..............................X..XX.................X..............................................

output:

23617/5

result:

ok single line: '23617/5'

Test #73:

score: 1
Accepted
time: 52ms
memory: 86924kb

input:

10 30000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXX.XXX.XXX.XXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXX.X.XXXXXX.XX.XXXXXXX.XX.XXXXXX..XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XX.XXXX.XXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXX.X.X.XXX.XXX.XXX.XXXXXXXXX...

output:

8613/2

result:

ok single line: '8613/2'

Test #74:

score: 1
Accepted
time: 44ms
memory: 78648kb

input:

9 30000
XXXXXXXXXXXXXXXXXXXX..X.XXXXXXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXX.XXXX.XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX.XXX.XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.X.XXXXXXXX..XXXXXXXXX.XXXXXXXXXXXXXXXXX.XX.XXXXX.XXXX.XXXXXXXXXXXXXX.XX.XXXXXXX.XXX.XXXXXXXXXXX.XX.XX...

output:

22568/3

result:

ok single line: '22568/3'

Test #75:

score: 1
Accepted
time: 44ms
memory: 80996kb

input:

9 30000
..X.X.X.X.X.X..X..XX..X..XX..XX..XX..XXX..X.X.X..X..X.X..XX..X..X...X..X.X.....X..X..X.X..X..X.X..X..XX..X..X..XX.X..XX..X..X..X..X.....X.X..XX..XX..XX..XX..XXX..XX..XX..X.XX..X..X..X..X.X.X..X..XXXXX..X.X..X..X..XXX.X..XX..XX..X.X..X.X..X..X..X..XX..X..X.X..X..X..X..X..X..X..X.X..X..XX..XX....

output:

3/1

result:

ok single line: '3/1'

Test #76:

score: 1
Accepted
time: 37ms
memory: 82676kb

input:

9 30000
..XX...X.X..X..X.X..X.X..X.X..X..X...X..X..X..X.X.....X.X.....X..XX..X..X.....X.X.XX..X..X..X..XXX..X.X..XX..X..X..XX..X.X..X..X.X..X..XX..X..XX.X.X..X.X.X..X..X..X.XX..X..XX..XX.X..X..XXX..X..X..X..X.X.X..X..X.X..X..X.X..X.X.X..X..XX..X.X..X..X..X..XX....X..X.X..X.X..X.X..X..X..X..X..X.X.X....

output:

5/2

result:

ok single line: '5/2'

Test #77:

score: 1
Accepted
time: 55ms
memory: 93484kb

input:

10 30000
..XX...XX.X.X.X.X.X.X.X..X.XXX.X..X..X..XX..X.X.X..XX..X.X..XX..X.X..X..XX.X.....X..X..X.XX..X..X.X.X..XX..X..X..X.X..X..X..XX..X..XXX..X..XX.XX..XXX.X..X..X..X..X..X.X..X..X..X..X..XX..X.X.X.....X.X.X.XX..X..X.X..XX..X..X..X.XXX..X.X.X..X.X..XX.X..X.X..X..X.X..X.X..X.X.X..X..X..XX..X.X..X....

output:

3/1

result:

ok single line: '3/1'

Test #78:

score: 1
Accepted
time: 50ms
memory: 88224kb

input:

10 30000
..X.X.X.X.X..X..XX...XX..X..X.X...X..XX..XX..X.X.....X..X..X..X..XX.X..X..XX..X.X..X..XX..X..X..X..XX..X..X..X.XX..X..X..X..X.X..XX..X..X..X.X..X..XX..X..X..X.X..X.X.X.X..X..X..X.X..X.X.X......X..X..XX..X..X..X..X..X..XX..X..X.....X..XX.X..X.X..X.X..X.X.X..XX..X.XX..X.XX...X..XX..X.X..X..X....

output:

5/2

result:

ok single line: '5/2'

Subtask #5:

score: 1
Accepted

Test #79:

score: 1
Accepted
time: 124ms
memory: 143932kb

input:

12 50000
.XXXXXXXXXXXX.XXXXXXX.XX.X.XX....XX....XXXXX.XXXX.XX.XXXXXXXXXXXXX..XXXXX.X.XXX.XX..XXXXXX..XXX.XXXXX.XXXXXX.X.X..XXXXXXXXXXX.XX.XX.X.X.XX.XXXXXXXXXX.XXXXXXXXXX..XXX.XX.XXXXX.XXXXXX.XX.XXXX.XXXXX.XXXX.XXXX.XXXXXX.X.XX.XXX.XX.XXXX..X.X.XXXXXXXXXXXX...XXXXX.XX.XX...X.X..XXX.X...XXX..XXXXXXX.....

output:

0/1

result:

ok single line: '0/1'

Test #80:

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

input:

12 11
....XXX.XXX
XXX..XXX.XX
X....X.X...
..XX.X....X
X..X.X.X.XX
.X....X.XX.
X......X.X.
....XXXXX..
XXX....X.XX
X.X.XX..XX.
..XX..XX.X.
XXXX.X.....

output:

2/1

result:

ok single line: '2/1'

Test #81:

score: 1
Accepted
time: 100ms
memory: 143988kb

input:

12 50000
..............................X...................X.X.X........XX.X..........X.XXX...........................XX.XX...........X.....X........X...........X....XX....X.......X.................X...................................................................................XXXX....XXX..........

output:

2168/1

result:

ok single line: '2168/1'

Test #82:

score: 1
Accepted
time: 118ms
memory: 146508kb

input:

12 50000
......X.............XX.....XXX....X....X...........................X....................X.....................................................................................XXX.........X.XX.....................X..................................................................................

output:

2150/1

result:

ok single line: '2150/1'

Test #83:

score: 1
Accepted
time: 94ms
memory: 149792kb

input:

12 50000
.........X.XX......X.....X....X.............X...XX..............................X..........................................................X...........X................................................X.X.X.X.X...XX.....XXXX........................................XXX.X.XX.......................

output:

1735/1

result:

ok single line: '1735/1'

Test #84:

score: 1
Accepted
time: 113ms
memory: 135772kb

input:

12 50000
.....................................XX..........X.........X.................................................X...............................................................XXXXX......X...XX.................................................XXX....................................................

output:

3469/2

result:

ok single line: '3469/2'

Test #85:

score: 1
Accepted
time: 142ms
memory: 139912kb

input:

12 50000
....................X.................X.....X..........XXXXXXXXXX................XX...........................................................X.X...........X.............XXXXXX.....................................................X..XX..............X.............................................

output:

18240/7

result:

ok single line: '18240/7'

Test #86:

score: 1
Accepted
time: 133ms
memory: 138136kb

input:

12 50000
...XX.......................X.XX.XXX.XXXX............XX.X.....X..XXX..XX.X.XX...........................X...................................................X...................................X.................................X..X.X...X....X.....................................................

output:

34069/5

result:

ok single line: '34069/5'

Test #87:

score: 1
Accepted
time: 125ms
memory: 137768kb

input:

12 50000
X..........................................X.......X...XX................................XX.......X........................XXX......................X..X..............X....X.....................X...........................................................................................X........

output:

27886/5

result:

ok single line: '27886/5'

Test #88:

score: 1
Accepted
time: 115ms
memory: 148476kb

input:

12 50000
XXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XX..XXXX.XXXX..XXXXXXXXXXXXX.XX.XX.XXXXX.XXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXX.XXXXXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.X.XXXX.XXXXXXXXXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XXX.X...

output:

39540/7

result:

ok single line: '39540/7'

Test #89:

score: 1
Accepted
time: 143ms
memory: 146612kb

input:

12 50000
..XXX..XX.........X.X......................................X.......................X................................................................X.......X.X..X...................................X..XXXX.X......X.........................................................XXXX....................

output:

38527/5

result:

ok single line: '38527/5'

Test #90:

score: 1
Accepted
time: 133ms
memory: 149788kb

input:

12 50000
...X.....X..XXXX.....X..X....X.XX....X..X....X...X.....X..XX..X...X.X.X....XX.XX....XX....X....X...X....X..XXXX....X...X.X....XX....XX....X..X....XX...X..X....XX..XXXX...X....XX...X....X....XX...X....XXXXXXXX....XXXXX.XXXXXXXX..XX...X.........XXX.XXX.........X....X.X....X....X....X..X....X....

output:

5/1

result:

ok single line: '5/1'

Test #91:

score: 1
Accepted
time: 114ms
memory: 141804kb

input:

12 50000
.XXXXX.XX..X.XXX....XX..XXX.XXX.X....XX....XXX....X..X.X...X.X...X.X....XXXX.........X....XX..X....XX.X....XX....X..XX....XX...X....XX....X....X.X...X....XXX.XX....X....X....X.X..X....X..XX...XXXXXX...XXXXXX....XXX..X...X.X....X.X....X..X.X.XXX..X....XX.......X....XXX....XXXXXXX....X.X........

output:

9/2

result:

ok single line: '9/2'

Test #92:

score: 1
Accepted
time: 135ms
memory: 144024kb

input:

12 50000
..X.X.XXXX..XXXXX..XXXX..X.X.X.X.XXX.XX.X.X..X..XX..X.X..XXX..XXXX..X..X..XX.X.XX.X..X.X.X..XX..X..XXX.X..XXXX..X.XX..XXXXXXX..X..X.X..XX..X..X..X..X..X..XX..X..X..XXXX.....XXX..XX..X.X..X.XXX..X.X..XX.XXXXX..X..XX.XX..XX..XXXX.XX..XX..XX.XXX..X.XXX.XXXXXXX.X.X..X.X..X.XX..X..XXXXX..XXXX.XX...

output:

3/1

result:

ok single line: '3/1'

Test #93:

score: 1
Accepted
time: 111ms
memory: 138584kb

input:

12 50000
.XX.XX....XX..X..X..XX.X.X.X..X.X.X..XXX.X..X..XXX..XX.X..X..X..XX.XX..X.X..X..X.X.XX.....XXXXXX.X..XXX..X..XX..X.XXXXXX.X.X..XXX..X.X..XX.....X.X..X.X.X....X..X..X..XXXX..XXX..XXXX.X.X.X..XX..X..X..XXX.X..X..XX.X..X..X....X..XX..XX..XXX..XX.X..X..XXX.X..XXX.XX..X..X..X..XXXXX.X..X..X..X.X....

output:

5/2

result:

ok single line: '5/2'

Test #94:

score: 1
Accepted
time: 100ms
memory: 147756kb

input:

12 50000
..X.X.X.X.XX...XX.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X..X.X..XX.X..XX..X.X..X..XX..X..X.X..XX..X..X..X.X..X..X..XX..XX.X..X..X..X..X..XX..X..X..X..X..X..X..X..XX..X..X.....X..X..XX..XXX..XX..X.X.X.X..X.X..X.X..X..X.X.X.X..X.X.X..X..X.X..X..XX..X.....XX..XX..X..XX..X..XX.XX..XX..X.X..X..X.X..XX.....

output:

3/1

result:

ok single line: '3/1'

Test #95:

score: 1
Accepted
time: 117ms
memory: 143544kb

input:

12 50000
..X.X.X.X.X.X..X..X.X.X.X.X.X.X.XX...XX.X.X.X.X.X..X..X.X..X..X..X.X.X..X.X..X..X..X..X..X..X.X..X..X..X.X..X..XX..X.X..X..X..X..X..X.X....XX.X..X..X.XX..X..X..X..X..X..XX..X..X.X..X..X.X..XX.....X.X..X..XXX..X.XX..X.X..XX.X.XX.....X..X..XX..X..X..X.X..XXXX..X..XX..X.X..X..X..X..X......X..X...

output:

5/2

result:

ok single line: '5/2'

Subtask #6:

score: 1
Accepted

Test #96:

score: 1
Accepted
time: 2ms
memory: 34852kb

input:

14 60000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #97:

score: 1
Accepted
time: 282ms
memory: 185344kb

input:

14 59999
......................................................................................................................................................................................................................................................................................................

output:

59999/2

result:

ok single line: '59999/2'

Test #98:

score: 1
Accepted
time: 267ms
memory: 183152kb

input:

14 60000
...X.X.X..X.X....X.XX..X..X...X.....X.XXXX.....XXX...X.X.XX.X.XX...X..XXX.X..X..X.XX..XX......XX.XXX.XX..X.XXX.XXXXX..XX..X.X.XX.XX...XXXX.XX..X.XX...X.X.X...X.XX..XX...X.X.X.XXXXXX..X.X.X.....X...XX.XX.....XX.........X..XX.XXXXXXX..XX.XX..XX.........X..XX....X.XX..XXX...XXXX.X..XX.X...X.X....

output:

13/1

result:

ok single line: '13/1'

Test #99:

score: 1
Accepted
time: 191ms
memory: 185964kb

input:

14 60000
XXXX.............X..............................X.......XXXX............................................X....................................................XXX............................X.X......XX........................................X............X.....X..XXX..............................

output:

2399/1

result:

ok single line: '2399/1'

Test #100:

score: 1
Accepted
time: 176ms
memory: 195352kb

input:

14 60000
...................X........................X.........X..........X...........X............................XX........X...XX................................X.....................X..XX..............X.XX...XXX....XXX....X......X.X...................................................X...........X....

output:

2396/1

result:

ok single line: '2396/1'

Test #101:

score: 1
Accepted
time: 139ms
memory: 180744kb

input:

13 60000
XX.XXXXX...X..........................................................................X................XXX.....................X......X.X.........X................................X...........XXX....X.....X.XX......X..XX........X...XX.............................................................

output:

1060/1

result:

ok single line: '1060/1'

Test #102:

score: 1
Accepted
time: 157ms
memory: 176496kb

input:

13 60000
....................................................X................................................X.XXXX.........X..X...XXX.XX.XXXX...XXX..........................................X....................................X..X.......X.X.............................................................

output:

2119/2

result:

ok single line: '2119/2'

Test #103:

score: 1
Accepted
time: 220ms
memory: 197144kb

input:

14 60000
........................................................X...........X..............X..........................X......X.............................................X...................................................X.X....X...........................................................X....XX.....

output:

49429/14

result:

ok single line: '49429/14'

Test #104:

score: 1
Accepted
time: 169ms
memory: 186948kb

input:

14 60000
.......................................................................X.X..........................................................................................................................................XXXXX..X....X.XX..................................X......................X........

output:

18231/13

result:

ok single line: '18231/13'

Test #105:

score: 1
Accepted
time: 168ms
memory: 193240kb

input:

14 60000
......................................................................................................................X...............................................................................................................................................................................

output:

14057/3

result:

ok single line: '14057/3'

Test #106:

score: 1
Accepted
time: 182ms
memory: 189212kb

input:

14 60000
.X.XXXXX.XXXXXXX.XXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.X.XXX.XXXXXXXXXXXXXX.X..X.XXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX.XXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXX.XXX.XXXXXXXXXXXXXXX.XXXX.XXXXXXXXXX.XX...

output:

50731/7

result:

ok single line: '50731/7'

Test #107:

score: 1
Accepted
time: 217ms
memory: 199092kb

input:

14 60000
X..XX..X...........X................................................................................X..............X........................................................................XX.XXX.........................................................X..........XX....................X..XXXX...

output:

59261/8

result:

ok single line: '59261/8'

Test #108:

score: 1
Accepted
time: 181ms
memory: 193496kb

input:

14 60000
...................X..................X..................X..................X..................X..................X...................X.X...................X.......X...................X...................X.................X...X..X...................X.................X........X.............X...

output:

20/1

result:

ok single line: '20/1'

Test #109:

score: 1
Accepted
time: 160ms
memory: 185436kb

input:

14 60000
....................X.................X..................X..................X..................X..................X...................X.........X................X.................X...................X..................X................X...................X........X...................X.........

output:

39/2

result:

ok single line: '39/2'

Test #110:

score: 1
Accepted
time: 198ms
memory: 199028kb

input:

14 60000
.XXXX.X.X.X.XX...XX.X.X.X.X.X.X..X.XX..X.X..X.XXX..X..XX..XX..X..XXXXX..X.X..X..XX..X..X.XX..XXXXXXX.X.XXX.X..XX..XX.X.XXXX.X..XXX.XX..XX..XXX..XXX..X.XX.XX..X..XX..X..X.XX..X.X..XX..XXXXXX..XX.X.XXXXXX..X..X..XX...XX.X..X.X..X.XXXX.XX.X..X..XXX..X..X..XX..XX..XXXX..X.X..X.X..X..X.X..X..X.....

output:

3/1

result:

ok single line: '3/1'

Test #111:

score: 1
Accepted
time: 199ms
memory: 183196kb

input:

14 60000
..X.XXX.X.X.X.X.XX...X...XXXX.X..X..X..X..X..XXXXXX..X.X..X.X..X..X..XX..XXX..XXX..XXXX..XXXXX.X.XX..XX.XX.XXXX..X..XX..X..XXX..XXXXX..XXXX.XX.X.X.X..X.XX..XXX.XX..XX..X..XX.XX..X..X..X.XXX..X..X.X.X..XX.X..XX..X..XX..X..X..X..XXXXX.....XX..X..X..XXXX.XX..XX..X..X..X.X..XXX..X..X..XXX..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #112:

score: 1
Accepted
time: 206ms
memory: 197264kb

input:

14 60000
..X.X.X.X..XX..XX..X.X.X..XX..X..XX..XX..X.XX..X..X..X..X.X..XX.....X..X..X..XX..X..X..X..X..XX..X..X..XX..X..X.X.X..X..X..X.X..X.X..X.X..XX..X..X..XX...XX..X..X.X.X..X.X.X..X..X..XX..XX.X..X..X..X..X..X..X..X..X..XX.X..X..XX..XX..XX..XX..XXX..X.X..X..X..X..X..X..X..XX..X.X..X..XX..XXX..X.....

output:

3/1

result:

ok single line: '3/1'

Test #113:

score: 1
Accepted
time: 181ms
memory: 182884kb

input:

14 60000
..X.X.X.X..X.....X.X..X..X..X..X..X..X..X..XX..X..X..X..X..X..X.X..XX..X..X..X.X..XX..X..X.X.X..XX..X..X..X.X..XX..X.X..X.X..X..X.XX..X.X..X.X..X..X..X..X..X.X..X.X..XX..XXX..X..XX.X..X.X..XX..X..X.X..X..XX..X..XX.X..XX..XX..X..X..X..X..X.X.XX.X..X..X..X..XX..X.X..XX..X..X..X.X..X..X..X.X.....

output:

5/2

result:

ok single line: '5/2'

Test #114:

score: 1
Accepted
time: 217ms
memory: 193208kb

input:

14 60000
..XXX.XXXXXXXXXXX.X.XXX.X.X.X.X.X.XX...XX.XX...XXXX.X.X.X.X.XXX.X..XXXX.X..XXXXX..XX..XXXX..XX..X.X..X..XX..XXX..XXX..XX..XX.XX..XX.X..X.X.X..X..XXXXX.X.X..XXX..XXX.X.X..X..XX..XXXX.X..X.X..XX..XX...X.X.XX.X..XX..X..XXX..X..X.XX..X..XXXXX.XX..X..X..XX..X..XX.XX.....X..X..XXX.XXXX..X..X..X.X...

output:

3/1

result:

ok single line: '3/1'

Test #115:

score: 1
Accepted
time: 207ms
memory: 183036kb

input:

14 60000
X..X.XX.X.XXXXXXX.XXXXX.X.X.X.X.XXXXX.X.XX...XXXX.X.X.X.X.X.X.X..X.XXXXXXX..X..XX..X.XXX..XX.X.XXX..X..XX.X..X....X..XX..X.XXXXXX..X.X..X..X..XX.XX..X..XXXX.X.X.XXXX..X..X..XX..X..XXXXX..XXX..X.XXX..X..XXX..XX..X...X..X.XXXX..X..XXXXX..X..X..XX..X..X..X.X.X..X.X..X.X..X..XX..X.X....XX..X.X....

output:

5/2

result:

ok single line: '5/2'

Subtask #7:

score: 1
Accepted

Test #116:

score: 1
Accepted
time: 263ms
memory: 228520kb

input:

15 70000
XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XX.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXX.X.XXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXX.XXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXX.XXXXX...

output:

0/1

result:

ok single line: '0/1'

Test #117:

score: 1
Accepted
time: 316ms
memory: 230124kb

input:

15 70000
.X.X..X....XXX..X.XX..XX.X....X.XX.XXX.X.X....XXX...XX.X..X.XXXX...XX..X.X..X...XX.XX.X..XXX....XX...XX.......XX.....X...XX...X.XX.X...X...XXXX.X....X.X....XXX.X...XXX..X.X..XX.X.XX.X..X.XXXX...XXXXX.XX.XX..X..XXX.X......XX...X.X.XXXX.XX..XX.XX..XX..XXX.X.XX....XXXX.X.X..XX..X.XX..X.X.XXXXX...

output:

13/1

result:

ok single line: '13/1'

Test #118:

score: 1
Accepted
time: 287ms
memory: 234052kb

input:

15 69999
...................X..X.X.......................X...X.XXXX.................................................................................................................................................X.................................................................X........................

output:

2293/1

result:

ok single line: '2293/1'

Test #119:

score: 1
Accepted
time: 251ms
memory: 234164kb

input:

15 69999
.X....X.......................X.X.............................................................................................X.X.XXX.X............................................................................................X......X............................X.X..................X.........

output:

4585/2

result:

ok single line: '4585/2'

Test #120:

score: 1
Accepted
time: 267ms
memory: 234712kb

input:

15 69998
.X....................X...................................................X.......................................XX..X...............X............X............................................X...........X.................XX.XX.......................................................XX..........

output:

2666/1

result:

ok single line: '2666/1'

Test #121:

score: 1
Accepted
time: 237ms
memory: 230660kb

input:

15 69998
.................................................XX.X.................X......X......X.....X..XXX..........X......................................................................................XXX..X.X.............................................................................................

output:

5331/2

result:

ok single line: '5331/2'

Test #122:

score: 1
Accepted
time: 266ms
memory: 235168kb

input:

15 69997
...................XXXXX...X.........XXXXX.................................X..............................................................XX............X..XXX.....................X........................................................X.....X......X..X......XXXX..X...............X............

output:

58399/5

result:

ok single line: '58399/5'

Test #123:

score: 1
Accepted
time: 221ms
memory: 228696kb

input:

15 69996
............XX....X..X.............XX..XXX............X..X.X.X............................................X.......X.X....................................................................X........XXXXX...XXXX..XX....................X..............X......X.........................................

output:

5423/4

result:

ok single line: '5423/4'

Test #124:

score: 1
Accepted
time: 209ms
memory: 205904kb

input:

15 70000
XXXXXXXXXXXXXXXXX.XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXX.XXXXXXXXXX.X.XXXXX.XX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXXXX.XXX.X.XXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX...

output:

65681/12

result:

ok single line: '65681/12'

Test #125:

score: 1
Accepted
time: 276ms
memory: 228988kb

input:

15 70000
......................................................................................................................................................................................................................................................................................................

output:

57874/3

result:

ok single line: '57874/3'

Test #126:

score: 1
Accepted
time: 231ms
memory: 213924kb

input:

15 70000
......................................................................................................................................................................................................................................................................................................

output:

25358/5

result:

ok single line: '25358/5'

Test #127:

score: 1
Accepted
time: 281ms
memory: 232472kb

input:

15 70000
...XX.X.X.X.X.X.X.X.X.X..XX..XX..X..X..X..X.X..X..X.X..X..X..XX..XX..XX.X..X..X..XX..X..X.X..X..X..X..X..X..X..X...X..X..X..X..XX..X..X..XX..XX..XXX..X.X..X..XXX..X.XX..X..X..XX..XX..X.X..XX..X..X..X..X.X..XX.X..XX..X.X..X..X.XX..XX..XX..XX..XX..X.X..X.X.X.X..X..X..XX..XX..X.X..X..XX..X.X.X...

output:

3/1

result:

ok single line: '3/1'

Test #128:

score: 1
Accepted
time: 243ms
memory: 234056kb

input:

15 70000
..X.X.X.X.X.X.X.X.X.X.X..XXX.X..X..XX..XX.X.XX..X.....XXXX..X.X..X..X..X..XX..X.X..XX..X..X..X..X..X.X..X.X..X.....X.X..XX..XXXX..X..X..X.X.XX..X.X..X..XX..X..XX..XX..XX..X.X..X.X.X..X..XX..X..XX..XX..X..XX..X..X..X.X..X..X..X..X..X.X..X..X..X..X.X.X..X..X..X..XX..X..X..X.X.X.X..XX.X.XX..X....

output:

5/2

result:

ok single line: '5/2'

Test #129:

score: 1
Accepted
time: 252ms
memory: 231292kb

input:

15 69943
....................................................................................................X.................................................................................................X...............................................................................................

output:

100/1

result:

ok single line: '100/1'

Test #130:

score: 1
Accepted
time: 220ms
memory: 232284kb

input:

15 69943
...................................................................................................X..................................................................................................X...............................................................................................

output:

199/2

result:

ok single line: '199/2'

Test #131:

score: 1
Accepted
time: 317ms
memory: 232248kb

input:

15 70000
.XXX...XXX.XX..XXX..XXXXX..XXX..X..XX..X..X.XX..XX..XX..X..X..X..X..XXX..XX.X.X..X.X..X..XXX..XXXXXXX.X..XX..XX..XXXXX..X..XX..X..XX....XX..XX..XXX..XX..X.X.XX.X.X..XXX..X..X..X.XX..X..XXXX..X..XX.X..X..X.XX.X.XXXXX..XX..X.X..XX..XXX..X..X.X..X.XX.....X..XX..X.X..XX..XX..XXXX.XX..X..XXXX......

output:

3/1

result:

ok single line: '3/1'

Test #132:

score: 1
Accepted
time: 258ms
memory: 234664kb

input:

15 70000
..X.X.XXX..XXX.X.X..X..X.....X.X..X..XX..X..X..X..XX..X..X..XXXX..X.X.X.....X.X..XX..X.XX..X.X..XXXXX..XXXX..XXX..XX.....X..XXXXX...X.XX..X..X..XX..X.XX..XX.XXX..XX.X..X..XXXXX..X.X..X..X.X.X..X..XXX..X..XXX..XXXXXXX..XX.X..X..XX.XX.X..X.....X..XXX.X..X..XX..XX.X.XX.XX.X.X.X.X..XXX..X.XXX.....

output:

5/2

result:

ok single line: '5/2'

Test #133:

score: 1
Accepted
time: 272ms
memory: 232144kb

input:

15 70000
..X.X.X.X.XX...X...XX.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X.X..X..X..XX..X.X..X.X..X.X..X.X.X.X..X..X..XX..XX..X..X.....X..XX..XX.XXX.XX.X..X..X..X..X..XXX..XX..XX..XXX..X.X..X..X..X..X..X.X..X.XX..X..XX..X..X..X.X..X..X..X.X.X..X..XX..XX.X.X..X..XX..XX..X.X..XX..X..X.X..X..X.X..X.X..X..X..X....

output:

3/1

result:

ok single line: '3/1'

Test #134:

score: 1
Accepted
time: 247ms
memory: 232432kb

input:

15 70000
..X.X..X..XX...X...XX.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X.X..X..X..X..X..X..X..X.XX..X..XX.X..X..XX.X..XX..XX..X..X.X..X..X..X.X..X..X..X..X..XX..XX....XX..X..X.X..XX..X.X..X..X..X..X..XX..X.X..X.X..X..X.X..X..X..X..X..X.X..X..X..X..X..XX..X..X.X..X..X..XX..X.X.X.X.X.X..X..XX..X.XX..X..X..X...

output:

5/2

result:

ok single line: '5/2'

Subtask #8:

score: 1
Accepted

Test #135:

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

input:

16 80000
XX..XX..X.XXX.XX.XXX.XX...X..X..X....XX.....X........XXX.XXXX.X....X.XXXXX...X.....XX.X..XXX.X..X.XXX....XXXX...XX..X..X...X.XX..XXXX.XX.X....XX.X.XXX....XXX...X.XXXX..XXXXX..XX.XX..X.XXXXX.X..XXXX.XXXXX.X.XXX.X...XX.XXXXX..X..X....XX.....XX.X.XX..X.XXX.X..X..X....X.X..X..XX...X...XXX.X...X...

output:

-1

result:

ok single line: '-1'

Test #136:

score: 1
Accepted
time: 407ms
memory: 270096kb

input:

16 80000
XX..X..X..XX.XX..X.X.XXXX.X.....XX...XXXX..X.XXXXX.X....X.XXX...XX..X.X.X.XXXX.XXXXXXXXX.XXX.XXX..X.X.XXXX..XX.XXX....XXXX...X..X.XXX.XX.X.X.X.XX.XX.X.X......XX.X.XX..X....XXXX.X.X...X..X..X.X...X.XX..X.XX.X.XXXXXXXX.XX.X..X.....X.X.XX...XXX....XX..X.XXX.X..X.X..X..XXXX.XX.X.X.XX..XX.X..XXX...

output:

13/1

result:

ok single line: '13/1'

Test #137:

score: 1
Accepted
time: 344ms
memory: 266236kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

2433/1

result:

ok single line: '2433/1'

Test #138:

score: 1
Accepted
time: 317ms
memory: 277124kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

4865/2

result:

ok single line: '4865/2'

Test #139:

score: 1
Accepted
time: 267ms
memory: 242148kb

input:

16 65535
......................X....X....X.XXX................XX.........X.X.....................................X.....X............X...........................X.....X......X.X............X.....X....X....X..XX........X.X......................XX...X..XXXXX................................X....X..........

output:

1861/1

result:

ok single line: '1861/1'

Test #140:

score: 1
Accepted
time: 252ms
memory: 243048kb

input:

16 65535
.X..........................................................XXXXX.....XXXXX..........X......X...............................................................................................................XX...XX...............................................XXX.XX..............................

output:

3721/2

result:

ok single line: '3721/2'

Test #141:

score: 1
Accepted
time: 331ms
memory: 279400kb

input:

16 80000
......................................X..X.X..X............................................XX...X...............................X......................X................X...........X.X............................X.........................................................XXXX.....................

output:

3794/13

result:

ok single line: '3794/13'

Test #142:

score: 1
Accepted
time: 457ms
memory: 293232kb

input:

16 80000
.............................................X.XX....X.XX.........................................................................................................................................................................................................X.............X...X.................

output:

74012/3

result:

ok single line: '74012/3'

Test #143:

score: 1
Accepted
time: 327ms
memory: 283972kb

input:

16 80000
XXXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXX.X.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXX....

output:

16358/3

result:

ok single line: '16358/3'

Test #144:

score: 1
Accepted
time: 296ms
memory: 248368kb

input:

16 65536
.....XXXXX...............................X.........................X.........................................................XX.............................................................XX...XXX.............X.....................X............X.XX...X..........................XX.......XXXX...

output:

51741/5

result:

ok single line: '51741/5'

Test #145:

score: 1
Accepted
time: 303ms
memory: 271388kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

70807/8

result:

ok single line: '70807/8'

Test #146:

score: 1
Accepted
time: 255ms
memory: 244316kb

input:

16 65537
...........................................X........X...X...X............X......XXXX...............X............X...........X..X........................................X.................X........XX...........................XXXXXX......................X...........................X.............

output:

57/1

result:

ok single line: '57/1'

Test #147:

score: 1
Accepted
time: 244ms
memory: 242192kb

input:

16 65537
.XX..........XX.........................................X.XX..X.XX.........X.X.....X............................X.......................................................X..................X...............................XXXX.X.X..XXX.XXXXXXX.....................................XXXX.............

output:

113/2

result:

ok single line: '113/2'

Test #148:

score: 1
Accepted
time: 338ms
memory: 279216kb

input:

16 80000
..X.X.X.X.X.X.X.X.X.X.X.XX...XXX...X...XX.X.X.X..XXX..X.X..X..X..XX.X.....X..XXX.X...X.X..XXX..X..X..X..X..X..XX..X.X.X..X..XX..X..XX..X..X..X.X..X..X..X..XX..X.X..XX..XX..XX..X..X..XX..X.X..X..X..X..X..X..XX..XX.XX..XXX..X....X..X..XX..X..X.X..X..X..X.X..XX..X..XX..X.X..X..X..XX..X..XX..X....

output:

3/1

result:

ok single line: '3/1'

Test #149:

score: 1
Accepted
time: 320ms
memory: 279944kb

input:

16 80000
..X.X.X.X.X.X..X..X.X.X.X.X.X.X.X.X.X.X.X.X.X.X..X..XX.X..X..X.X..X..X.X..X..X..X..X..X..X..X..X.XX..X..X..XX.X..X..X.X..XX..XX..X.XX..X..X.X..X..XX..XX.X..X..X..XX..X..XX..X..XX..X.X..X.X..X..X.X..X.X..X.X.X.X..X.X..X.X..X..XX..X..X..X.X..X..X..XX..X..X..X..X..X..X..X..X..X..X..X.X..X..XX....

output:

5/2

result:

ok single line: '5/2'

Test #150:

score: 1
Accepted
time: 357ms
memory: 277488kb

input:

16 80000
..XX..XX..X.X..XX..XX.X..X.X..X.X.XX.X..X..X.XX..X..XX..X.X..XXX..X..XX..X..X.X..XX..XX..X.X..X.X..XX..X.X.X..XX..XX..X..XXX..X..X..X.X..X..XX.X..X..X..X.X..XX.X.X..X.X..X..X..XX..X.X.....X.X..X.X..X..XX..XX..X..X..X..X..X..X..XX..X..X..XX..X.XX..X..X..X.X..X..X..XX..X.X..XX..X.X..XX..X..XX...

output:

3/1

result:

ok single line: '3/1'

Test #151:

score: 1
Accepted
time: 312ms
memory: 279464kb

input:

16 80000
X..X.X.X..X..X..X.X..X..X..XX..X..X..X..XX.....XX.....XXX..X..XX..X..X.XX..X.X.X..XXX..X..XX..X.X..X..X..XX.X..X..XX..X..X.X..XXX.X.....X..X..X.X.X..X.X..XXX..X..X..X..X.X.X..X..X.X.....X.X....X.X..XX..X..X..XX..X..XX..X.X.X..X.X.X.X..XX..X..X..X.X..XX..XX..X..X.X..X..XX..X..XX..XX..X..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #152:

score: 1
Accepted
time: 376ms
memory: 277500kb

input:

16 80000
..XXX.X.X.X.X.X.X.X.XXXXXXX.XXXXX.X.XXXXXXX.XXX.XX...X...X...XX.X.X.XXX.X.X.XX..XXXX.X.XXXXXX.XXXXX.X..X.X.XXXX..XXXX..XX..XXX.XXX.X.X....XX..XX..XX..XXXXX.X..X..X.X..XX..X..XX..X..X..X..XX.X..X.XX..X.XXXX..XX.X..XX..X.X..X..X..XX..XX.X.X.XXXX.X..X..XX.XXXXX..X.X.X..X.X..XXXXX.X..X..XXX.XXX...

output:

3/1

result:

ok single line: '3/1'

Test #153:

score: 1
Accepted
time: 358ms
memory: 277352kb

input:

16 80000
..XXX.XXXXX.XXXXX.X.XXXX...XX.X.XXXX...XX.X.XX...XXXX.XXX.X.XXXXX.X.X.X.X..XXX.X..X..XXXX.X.XX.X.XX..X..X.X..X.....X.X.XXXX..X..X..X.....X..X..XXX.X..XX.X.X..XX.XX..X..XX..X.X..X..X.X..X..X..XXX..XX..XXXX..X.X..X.X.X..X..X..X.X..X.XXXX..X.X..X..XX..X.X..X..XXXXX..X..X..X..X..X..X..X.XX..X.X...

output:

5/2

result:

ok single line: '5/2'

Subtask #9:

score: 1
Accepted

Test #154:

score: 1
Accepted
time: 495ms
memory: 306832kb

input:

17 90000
XXX.XX.XXXX.X..X..XX.XXX..XX.X....X..X..XXXXX.XX....X.XX.X.XXXXX.X..X....X..XX..X.X.XX.XX..X.XX..XX...X.XXXXX.......X...XX......X..XX.......XX..X.X..X.X.X.XX..X..XXX.XXXXX..XX.XX.X....X.XXX.X.X.XXXXXX..XX.XX.X....X......X..XX...X.XXX.X..XXX.XX.X..XXX.XXXXX.X.XXXX.X.X..X.XXX....X.X..XXX.XX.....

output:

13/1

result:

ok single line: '13/1'

Test #155:

score: 1
Accepted
time: 391ms
memory: 310328kb

input:

17 90000
......................................................................................................................................................................................................................................................................................................

output:

2643/1

result:

ok single line: '2643/1'

Test #156:

score: 1
Accepted
time: 384ms
memory: 307448kb

input:

17 90000
......................................................................................................................................................................................................................................................................................................

output:

5285/2

result:

ok single line: '5285/2'

Test #157:

score: 1
Accepted
time: 407ms
memory: 310400kb

input:

17 90000
.............................................XX.....XX.X......X..............................................XX.XX................X.XX.X..........................................................................X.............X...XXX.......XX.XXXXX...........................X................X...

output:

2422/1

result:

ok single line: '2422/1'

Test #158:

score: 1
Accepted
time: 422ms
memory: 312240kb

input:

17 90000
X.......................X.XXX...........X......................................X................................X..X.X..........................................................XX.XXX...............XXX..X.......................................X...X..X................................X...........

output:

2272/1

result:

ok single line: '2272/1'

Test #159:

score: 1
Accepted
time: 492ms
memory: 312432kb

input:

17 90000
XX..X......X..............X.............X..................X.................................................................................................................XX................X...............X......X....................X........X....X......XXXX............XX.......X....X.......

output:

54074/11

result:

ok single line: '54074/11'

Test #160:

score: 1
Accepted
time: 476ms
memory: 314436kb

input:

17 90000
............................X...................X...................XXX...X.................................................X....................................................XX......X................................................................X..................X......XX.X..............

output:

58537/7

result:

ok single line: '58537/7'

Test #161:

score: 1
Accepted
time: 422ms
memory: 300108kb

input:

17 90000
....X............X..............X.........X...........................XX...XXX...................................................................................................................................................................X..X......XXXX.......................................

output:

69099/11

result:

ok single line: '69099/11'

Test #162:

score: 1
Accepted
time: 367ms
memory: 271700kb

input:

17 65536
..XX..............X......................................................XXX........X..X.X.........X.......................................XX......................................................X.X.......................................................XXX......................................

output:

40807/3

result:

ok single line: '40807/3'

Test #163:

score: 1
Accepted
time: 444ms
memory: 316492kb

input:

17 90000
................................................................................................XXXX.......................X.X...X.X.X.XXXXXXXX.....................X.............................................................................XXX.X......X.......XX........................X......

output:

86595/8

result:

ok single line: '86595/8'

Test #164:

score: 1
Accepted
time: 384ms
memory: 308280kb

input:

17 90000
.........................................X........................................X........................................X........................................X........................................X........................................X........................................X......

output:

42/1

result:

ok single line: '42/1'

Test #165:

score: 1
Accepted
time: 376ms
memory: 308424kb

input:

17 90000
.........................................X........................................X........................................X........................................X........................................X........................................X.........................................X.....

output:

83/2

result:

ok single line: '83/2'

Test #166:

score: 1
Accepted
time: 457ms
memory: 306272kb

input:

17 90000
X.X.X.X.X.X.X.XXX.X.X.X.X.X.X.X.XXX..XXXXXX.X..X.X..X..X.X..XXX..X.X..XX.X..X..X..X..X.X..X..X.X..X..X.X..X.X..X..X.XXX.X..XX.X.X.X..X.X.X..X.X..XX.X.X..X..X..XXXXX..X.X....XX..X..X..XXX.XXXXXX.XX..X.XXX..XXXX..X..XXXXXXX.XX..XX..X.XXXXX.X..XX.XXXXX.X..XX..X..XX..X..XXXXX..X..XXXX..XX..X.X....

output:

3/1

result:

ok single line: '3/1'

Test #167:

score: 1
Accepted
time: 428ms
memory: 308188kb

input:

17 90000
...XXXX.XXX.X.XXX.X.X.X.X.X.XXX.X.X.X..XXXX.X..XXXX..X.X.X.XXX.XX..X..XXXXX.X..X..X.XX..XXX.X..X..XXXX..X.XXXXX.X..X.X..XX.X..XX..X.XX.X..XXXX..X.X..XX.X..XXX..XX..X.X..XX..X.XXX..XXX.XXXX..XXXX..XX.XX.X..X..X..XX.XXX..XXXX.XX..XXX.X.X..XX..X.X..X..XXX.X..X..X..X.XXXXX..XX.X..XX..XXXX..XXX....

output:

5/2

result:

ok single line: '5/2'

Test #168:

score: 1
Accepted
time: 478ms
memory: 306252kb

input:

17 90000
X.X.X.X.X.X.XX...X.X.X..X.XXX..X.X..X..XX..XX..X..X..XX..X.XXXXXX..X.XXXXX.X..X..XXXXX..X..XXX.XX.XX..XX.X.X.X.XXX..X.XXXX..XXXX..XX..X.XXXXXXX.X..XXX.XXXXX..X..XX..X..X..XXX..X.X..XX..X.X...XX.X..XX..XX..XXXX..XX..XX..X.X.X..X.X..X.XXXXXXXXX..X.XXXX..X..X..XX....X..XX..XX.X..XXXXX..X.XXX.....

output:

3/1

result:

ok single line: '3/1'

Test #169:

score: 1
Accepted
time: 435ms
memory: 308200kb

input:

17 90000
X.X.X.X.XX...XX.X..XX.X..X..XX.X..X..XXX.X..X..XXX..X..XX.XX..X.XX..X..X.X..X..XX.X..XXX..XX..X.X..XXX..X..X.X..XX..XX.X..X.XXX.X..XX.X.X..XX..X.X.XXXX..X..X.XXX..XXXXXXXX.....XX.X..X.XX..XXXX..XX..X.XX..XX..X.X.XX.X.X..XXX..XX.X..X..XXXX.....XXX.X..X..XX.X.X..X..XXXXX..X..XX..XXX..XXXXX..X...

output:

5/2

result:

ok single line: '5/2'

Test #170:

score: 1
Accepted
time: 461ms
memory: 306176kb

input:

17 90000
..XXXXX.X.X.X.X.X.XX...XX.X.X.X.XXXXXXX.XXX.X.X.X.X.X.X.X.X.XXXXXXXXX..XX..XX.X..X.X..X..XXXXXXX.X..XX.X..X..X..X.XX..XXX..X..XXX..XXXX.....X.XXX..X..X..X..XXX.X.XX..XXX..X..X..X.X..XXXX..XXXXX..X..XXXX..X..X..X..X..X..XXXX..X..XX.X..X.XXXXX.XX..X..XXX..XX..X..XX..XXXX.X..X..XX.X.XX..X.XX.....

output:

3/1

result:

ok single line: '3/1'

Test #171:

score: 1
Accepted
time: 435ms
memory: 310452kb

input:

17 90000
..X.XX...XXXX.X.X.X.XXX.X.X.X.X.XXX.X......XX.X.X.XXXXX.X.X.X.XX.XXX.XX..X.X..XXX..XX.X..XX.XX..XXXX..X..XXXXXX..X.X.XX..X.X..X.XX..XX..XXX..XXX..XXX..X.X.X..XX..XX..X..X..X..XX..X..XX..XXXXXXX.XX.X..X..X..X..X..X.X.X.X..XX.X..X..X.X..X.X..X..XXXX..XX..XX..XX..XX..XXX..X..X..XX.X..X..X..XX....

output:

5/2

result:

ok single line: '5/2'

Subtask #10:

score: 1
Accepted

Test #172:

score: 1
Accepted
time: 1809ms
memory: 378544kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

50000/1

result:

ok single line: '50000/1'

Test #173:

score: 1
Accepted
time: 535ms
memory: 342832kb

input:

18 100000
.....X...................................X....................X....................XX..............X................X...X.............................................................................................................................................XXXX...........................

output:

10747/18

result:

ok single line: '10747/18'

Test #174:

score: 1
Accepted
time: 488ms
memory: 335236kb

input:

18 100000
......................................................................................................................................................................................................X...X........................................X...................XXXX..........................

output:

74774/17

result:

ok single line: '74774/17'

Test #175:

score: 1
Accepted
time: 529ms
memory: 325048kb

input:

18 100000
..XXXX..X..X................................................................X.............................................................X..X..XX...X.XXXX....X................X..X.....XXXX....................X..............................X.XXXXX.............................XXX......XX......

output:

43016/9

result:

ok single line: '43016/9'

Test #176:

score: 1
Accepted
time: 365ms
memory: 302280kb

input:

18 100000
............................XXXX.X...XX...X.............................................X..................XX....X...X............................................................................X.........................X......................X.............................X..............X....

output:

38219/8

result:

ok single line: '38219/8'

Test #177:

score: 1
Accepted
time: 498ms
memory: 324832kb

input:

18 100000
....XXX.X.....................X..X..................................X.............................X....XXXX.......................................................................X.................................................XXX...XX..X.XX.X..........................................X......

output:

12639/5

result:

ok single line: '12639/5'

Test #178:

score: 1
Accepted
time: 552ms
memory: 344804kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX..XXXXX.XXXXXX.XXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX.XXXXXXXXXXXXX...

output:

70895/4

result:

ok single line: '70895/4'

Test #179:

score: 1
Accepted
time: 503ms
memory: 330304kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

65504/5

result:

ok single line: '65504/5'

Test #180:

score: 1
Accepted
time: 527ms
memory: 340944kb

input:

18 100000
......................X.................X........................X..................................XX..............................................XX...............................................................................................................................................

output:

37160/3

result:

ok single line: '37160/3'

Test #181:

score: 1
Accepted
time: 512ms
memory: 328948kb

input:

18 100000
XXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXX...

output:

81149/15

result:

ok single line: '81149/15'

Test #182:

score: 1
Accepted
time: 482ms
memory: 332896kb

input:

18 100000
...............X...........................XXX.X.XXX.XXX.XXXX.XXX............................................................X.............X..X.....................................................................................X.....................................X..........................

output:

16342/3

result:

ok single line: '16342/3'

Test #183:

score: 1
Accepted
time: 631ms
memory: 352124kb

input:

18 100000
.....X....X..XXXXXX...X....X.X........X.......................................................................................................XX......X....XXX.X...............XXX.......................XX...................................................X.....X....XX..........................

output:

72698/3

result:

ok single line: '72698/3'

Test #184:

score: 1
Accepted
time: 554ms
memory: 348340kb

input:

18 100000
XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

56408/5

result:

ok single line: '56408/5'

Test #185:

score: 1
Accepted
time: 505ms
memory: 332048kb

input:

18 100000
.................................X..............................................................X........XX................................................................................X..................................................................................XX...............X.....

output:

81164/7

result:

ok single line: '81164/7'

Test #186:

score: 1
Accepted
time: 463ms
memory: 340212kb

input:

18 100000
..X.X.X.X.X..X.X..X.X..XX..X.XX..X..X.X..XX..X..XX..X.XX..XX..XX..XX..XX..X.X.X..XX..X.X.X..XX..XX..X..XXX..X.X..X..X..X..X..X..X..X..XX..X..X..X..X..XX..X.X..XX..X..X..XX.X..XX..X..X..XX..X..X.X..X..XX..XX..X.XX..X.X.X..X..XX..X..XX..X..X.X..X..X..XX..XX..X..X..X..XX..XXX..X..X.X.X..X.X.....

output:

3/1

result:

ok single line: '3/1'

Test #187:

score: 1
Accepted
time: 476ms
memory: 328976kb

input:

18 100000
..X.X.X.X.X..X..X.X..X..X..X..X..X..X..X..X..X..X..X..X..XXXX.X..X.....X.X..XX..X.X.X.X..X.X..X.X.X.X..X..X..XXX..X.X..XXX..X..X.X..X..X..XX..X..XX..XXX.X..X..X..XX..X.X..X..X.X..X.X.X.X..X..XX..XX..X.XX..X..X.X..X..X..XX..X..X..X..X..X.X..X..XX..X..X.X..X..X..XX..X..X.XX..X..X..X..X.X..XX...

output:

5/2

result:

ok single line: '5/2'

Test #188:

score: 1
Accepted
time: 479ms
memory: 340696kb

input:

18 100000
...XXXXXX...X...XXXXXX..X..XX...X...X...X...X...X....X...XXX..X.XX.XXX.X....X.X...X...XX....X..X..XXX........X....X.XX..XX...X.XXX.X....XX....XX....XXXX.XX..X.XXXXX.XX..XXX....X....X...X..X....X....X..XX.XX....X.XXX....X..XX....XX....X.X....X.X..X.XX....X..X..XX.XXX....XXX.X....XX....X.X.X...

output:

5/1

result:

ok single line: '5/1'

Test #189:

score: 1
Accepted
time: 491ms
memory: 332500kb

input:

18 100000
....X.X.X.XXXXXX.....X..XX..X..XX...X...X...X...X....X....X....X.X....X....XXXXX....XX....X...XX.X....X.X....X....X...X....X.XX.XXXXX....X.X.X.X.X....XX.XX...X.X.X....X...X....XX....XXX.X....X.X....XXXX....XX.X....X....X..X...X.XX..X....X.X....XX....XXXX.XX.X....XX....X..XXX.XXX....XX..XXX...

output:

9/2

result:

ok single line: '9/2'

Test #190:

score: 1
Accepted
time: 515ms
memory: 335888kb

input:

18 100000
..XX.XXX.XXXXXXXX.X..XX.X..X.XX..X..XX..XX..X.X.XX..X..XX..XXX..XX.X.XX..X..XXX..XX.XXXXX..XX..XX..X..X....X..X.XX..XX..XX.XX..XX..X..X..XX..X.XXX..XXXX..X.X..X..XX..X..X..XX..XXXXX..X..XXX..XXX.X..X.X..X..XX..X.X.X.XXXX..XX..X.XXXXX..X.X..X..XX..X..X.X.X.XX.XXXX.XX..XX.XXXXXX..X..X.X..XXX...

output:

3/1

result:

ok single line: '3/1'

Test #191:

score: 1
Accepted
time: 524ms
memory: 329704kb

input:

18 100000
X.X..XXX.XX.X..XX..XXXX.X..XXXX..X.X..X.XXX.X.X..X.X.X..XX.X..XXXX..XXX..X..XX..X.XXX..X..XXXX..X.XX..XX..X..X.X..X.XX..X..XX..X..X.XXX.XXXX..X..XXX..XXX..X.....X.XX..XXXXXXXXXXXXXX..XXXXXX.....XXXX..XX..X..X..X...X..X..X..X..XX..XXX..XXX..X.X..XXX.X..X.X..XXXX..X.XX..X..XXXX.X..XX..XXXX.....

output:

5/2

result:

ok single line: '5/2'

Test #192:

score: 1
Accepted
time: 518ms
memory: 339908kb

input:

18 100000
..X.X.X.XXX..X..XX..X.X..X.XX..X..X.X..XXXX..XX.XXXX..X..XX..X.X..X.X..XXX..XXX.X.X..XX..X..XXX..XX..X.X..X..X.....X.XX..XXX.X..X.X.X..XX..XXXX..X.X..X.XXXXX..XX..X..X..X..X..XX.X.X..X..X.XX..XXXXX..X.X..X..X..X..X.X..XXXX..X.XX..XX..XX..X..XX..XXX.XXX..XX..X..X.X..XXXXX..XX.XX..XXXXX..X.....

output:

3/1

result:

ok single line: '3/1'

Test #193:

score: 1
Accepted
time: 492ms
memory: 328688kb

input:

18 100000
X.XXXXXXX.X..X..X.X..X.X.X..XX.X...X..X..XX..XXXXXX.X..X.XXXX..X.X...X..XX.XX..X.X..XX..XX..XX.XXX..XX.XX..XXX..XX..XXX..XX.XX.X..XXXXX..XX..XX..XXXX.XXX.XXX..X..XX.XXXX..XX...X..XX..XXXXXXXX..XX..X.XX..X..XXX..X.XXX..X..X.X.X..X..X..XXX..X.X..XX.X..XXX.X.X..X.X..X..XX..X..X..XX..X..XXXXXX...

output:

5/2

result:

ok single line: '5/2'

Test #194:

score: 1
Accepted
time: 461ms
memory: 339440kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X..X..X..X.X..X.X..X..X..X..X..X.X..X.X..XXXX...X..XX.X.....X..X..X..X.X..XXXX..X..X..X..X.X..XX.X..X.X.X..XX..X..XX.X.X..X..XX..X.X..X..X..X..X.X..X.X..XX..X..XX.X..XX..X..X.X..X..X..X..X.X.X..X.X..X..XX..X..X..X..XX..X.X..XX.X..X..X..X..XX..X...

output:

3/1

result:

ok single line: '3/1'

Test #195:

score: 1
Accepted
time: 473ms
memory: 332668kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X..X..X....X..X..X..X.XX..XX..X.X..X..XX..X..X..X..XX..X.X..X..X..XXX..X..XX..XX..XX..X.X..X..X..X..X..X.X..X..XX..XX..XXXX..XX.X..XX..X.X..XX.X..X.X..XX..X.X..XX..X.XX..X.X..X..XX..X..X.X..X..X..XX..X.X....X.XX..XX.X..X..X..XX..X..X..X..XX.X.....

output:

5/2

result:

ok single line: '5/2'

Test #196:

score: 1
Accepted
time: 461ms
memory: 339012kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.XX...XX.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X..X..XX..X..X.X..X.X..X.X.X.XX..X..XX..X..XX..X.X..XX..XX..X..X.X.X..XX..X..X.X..X..X..X..XX..X..X..XX..XX.....XXX....X....X.X..X.X.X..X..X..X..X..X.X..X..XXX..XX.X..X..XXX..XX..X.X..XX.X...X..X..X.X..X..X..X.XXXXX..X...

output:

3/1

result:

ok single line: '3/1'

Test #197:

score: 1
Accepted
time: 457ms
memory: 330384kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X..X..X.X.X.X.X.X.X.X.X.XX....XX..X..X..X..X.X..XX..XX..X..XX..X.X..XX..X.X..X..X..X..X.X..X..X..X..XX..XX..X.X..X..X.X.X..X..X..X.X..X..X..XXX..XX..X..X..XX..XX..XX..XX..X..XX..XX..X.X.X.X..X..X..X.X..XX..XX..X..X..X.X..XX..X..XX..X..X..X..X.....

output:

5/2

result:

ok single line: '5/2'

Test #198:

score: 1
Accepted
time: 499ms
memory: 340272kb

input:

18 100000
XXX.X.XXX.X.XXX.XX...XX.X.X.X.X.X.X.X.XX...XX.X.XXX.X.XXX.X.XXX.X.X.X.XX...XX.XX.X.X..X..X..XX..X..X..XX..XXXXXX.XXXXXXXX..XX.X..XX.XXX..XX..XXX..XX..XX..X..XXX..XX.XX..X..X..XXXX.X.XXX..XX..XXXXX..X..X.X..XXX..XXXX..XXXXXXXXXX..X..X.X.XX..XXX..XXX..X.XX..XXX..XX..X..XXX..X.X.XX..XX.....X....

output:

3/1

result:

ok single line: '3/1'

Test #199:

score: 1
Accepted
time: 1071ms
memory: 371376kb

input:

18 99999
......................................................................................................................................................................................................................................................................................................

output:

99999/2

result:

ok single line: '99999/2'

Test #200:

score: 1
Accepted
time: 509ms
memory: 334020kb

input:

18 100000
..XXX.X.X.XXXXXX...XX.X.X.XX...XX.X.XXX.X.X.X.X.X.X.XXXXX.X.X.XXX.X.X.X.X..X..X..X.X..X.X..X..X..XXX.X..XXX..X.X..X..X..XXX...XX..XX.X..XX..X..XX..X.X..XX.X..XXXXX...XXX..X..X.X..XXX..XX..X.X.X..XXX..X....XX..X..XXX.X.X.X..XXX..X..X.XX..XX..XX..X..XX..X.X..XX.XXX.XX.XXX.X.X..X.X.X.XX..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #201:

score: 1
Accepted
time: 7ms
memory: 40756kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #202:

score: 1
Accepted
time: 22ms
memory: 34932kb

input:

1 100000
......................................................................................................................................................................................................................................................................................................

output:

0/1

result:

ok single line: '0/1'

Test #203:

score: 1
Accepted
time: 299ms
memory: 83836kb

input:

18 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

output:

1/2

result:

ok single line: '1/2'

Test #204:

score: 1
Accepted
time: 46ms
memory: 43648kb

input:

2 100000
....X.X..........X.X..XX......XX...X.XX.X..XX.....X..XXX...XXX..X....XXX.X.......XXXX.XXX.........X.X.X.....X..X.......XX.....XX.XX.X.....X.XXX....X..X....XXXX.X......X.XX.XX...X.......X..X...X..X.X.X.XX..X..X.XXX...X..X..XXX.X......X....X.XXXX..XXX...X..X......X.X...X.........XX...XXXXX.XX...

output:

9/1

result:

ok single line: '9/1'

Test #205:

score: 1
Accepted
time: 442ms
memory: 343380kb

input:

18 100000
.................................................X...................................................................................................................................................................................................................................................

output:

3948/1

result:

ok single line: '3948/1'

Test #206:

score: 1
Accepted
time: 536ms
memory: 339436kb

input:

18 100000
XX....X.XX.X...X..X...X.X..X.XX...X..X..XXX........XX.X......X.X.XX.X..XX...X..XXX...X..X.XX..X.X.XXX..XX.....XXXXXX.....X.XXXXXX.XXXXXX.X.X...XX.XXX.X.....XX...XXXXXX..XX..X.XX....X.......XXXXX...X....X..XXX.XXXXX..X.XXX..XXXX...XX...X.XX..XX.X.X...XX.XXX.X..XXX.XX..X.X.X.XX..XXX.XX..XX.....

output:

13/1

result:

ok single line: '13/1'

Test #207:

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

input:

18 17
.....X..XX.X...X.
XX.XX..X.X...X.X.
XXXXX....XXXX..X.
X..X.X..XX.X.XXXX
...XXX.XXX.XXXXXX
XXXXXX.X.....XX.X
XX...X.X.XX...X.X
..X.XXX...XX.XXXX
X.XXXXXXXXX..XXX.
....X.X..XX.XX.X.
X..X.X...X.X.XX..
X.....XX....XX.XX
X....XX......XXXX
XX.XX..X...XX..XX
X....XX.X.XX...X.
X.X..X.XX.X....XX
...XXX...

output:

2/1

result:

ok single line: '2/1'

Test #208:

score: 1
Accepted
time: 7ms
memory: 40676kb

input:

18 100000
X.X...XXX.X..XXX.X.XX.XXXX.......X..XX..X..X..X.X..X.XXX..XX....XXXXXXX..X..X.X.X.X...X.....XX....X.......X.XXXX...X.XX..X...XX.X.XXXX.X.XXX.X.X.X.XXX..XXX..X...XX.XX..X.XX...XXX...X...X..XX.XXXXXX..X.XX.XXXX.XXXXX.XX.X...XX.XXX..X...X..X...XXXXXXX.X.X.XX.XX.X..X..XX.X...XX.XXXXXXX.XX...X....

output:

-1

result:

ok single line: '-1'

Test #209:

score: 1
Accepted
time: 458ms
memory: 340144kb

input:

18 100000
XXXXXXXXXXXXX.XXXXXXXXXXX.X.XXXX.XXXX.XX.XXXXXXX.XX.XX.XXX.XXXX.XX..XXXXX.XXXX.XXXXXXX.XXXXX.XXXXX.XX.X..X...XX.XXXXXXXX.XXXXXXX.XX.XX.XXXXXX.XXXXX..X..X.XXXX...XXXX.XXX.XXXX.XXXXXXX.XXXXXXXXXX.XXXXX.XXX.XX.XX..X.XXXXXXXXX.XX..XXXX.XXX.XX..X...XXXXXXXXXXXXX.XXXXXX.XX.XXXX..XXXXXXXXXX.X.XXX...

output:

0/1

result:

ok single line: '0/1'

Test #210:

score: 1
Accepted
time: 425ms
memory: 338384kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X..XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXX.XXX.XXXXX.XXXXXXXXXXXXXXX.XXXX.XX.XXXXXXXXXXXX...XXXXXXXXXXXXXXX.XXXXXXXX.XXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXX.XXX...

output:

0/1

result:

ok single line: '0/1'

Test #211:

score: 1
Accepted
time: 448ms
memory: 341828kb

input:

18 100000
XXXXXXXXXXXXXXXXXX..XXXXXXXXXXXX.XXXXXXX..X.XXXXXXXX..XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XX.XXX.XXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XXXX.XXXXXXXXXXXXXXXX.XXXXXXXXX.XXXXXX.XXX...

output:

2734/1

result:

ok single line: '2734/1'

Test #212:

score: 1
Accepted
time: 447ms
memory: 344244kb

input:

18 100000
XXXXXXXXXXXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXX.XXXX..XXXXXX.XXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXX...

output:

2721/1

result:

ok single line: '2721/1'

Test #213:

score: 1
Accepted
time: 457ms
memory: 342736kb

input:

18 100000
..........................................................................................................................................................XX.........X..X..X..................X......................................................................................................

output:

3058/1

result:

ok single line: '3058/1'

Test #214:

score: 1
Accepted
time: 476ms
memory: 344036kb

input:

18 100000
.....................XXX..XX........XX.............................................X.........X...X..........X.......................XXXX..X.....................................................................................................................................................X....

output:

3049/1

result:

ok single line: '3049/1'

Test #215:

score: 1
Accepted
time: 448ms
memory: 342328kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

2836/1

result:

ok single line: '2836/1'

Test #216:

score: 1
Accepted
time: 427ms
memory: 329492kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

5671/2

result:

ok single line: '5671/2'

Test #217:

score: 1
Accepted
time: 456ms
memory: 339876kb

input:

18 100000
X..X.X............................X............................................X............X.................X.......XXX............X........X........X.......X..XX.................................................................................................................................

output:

2706/1

result:

ok single line: '2706/1'

Test #218:

score: 1
Accepted
time: 470ms
memory: 340364kb

input:

18 100000
.......................................................X......................X....X............XX....XX.X.................................XXX...............................XX.................................X...XXXXX...........X................................................................

output:

2705/1

result:

ok single line: '2705/1'

Test #219:

score: 1
Accepted
time: 450ms
memory: 341768kb

input:

18 100000
...................X..X...........X.........X.XXXX....X...X...X.............X......XXX.................................................XXX...X..................XXX...X.............................................................X...XXX..X.XX...X...................X............................

output:

2875/1

result:

ok single line: '2875/1'

Test #220:

score: 1
Accepted
time: 457ms
memory: 341796kb

input:

18 100000
..............X.X......X.X............XX.............X.XXXXXXX..........X................................................................................................................................X...........X.XXXXX.XX.....................X........................XX.X....XXX......X......

output:

2872/1

result:

ok single line: '2872/1'

Test #221:

score: 1
Accepted
time: 505ms
memory: 341816kb

input:

18 100000
....X...............XX.X..............................XXXXX..XX..............X................X.........XXXX..............................................X........................X.XXXXX.X.........................X....................................XXXXX......................................

output:

2063/1

result:

ok single line: '2063/1'

Test #222:

score: 1
Accepted
time: 587ms
memory: 341832kb

input:

18 100000
............................X..........................................................................................................X.....X.......................................................................................................................................................

output:

2044/1

result:

ok single line: '2044/1'

Test #223:

score: 1
Accepted
time: 453ms
memory: 342072kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

2235/1

result:

ok single line: '2235/1'

Test #224:

score: 1
Accepted
time: 443ms
memory: 332052kb

input:

18 100000
.....................................X...............................................................................................................................................................................................................................................................

output:

4469/2

result:

ok single line: '4469/2'

Extra Test:

score: 0
Extra Test Passed