/*#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}*/
/*#include<stdio.h>
#define MAXSIZE 5
int queue[MAXSIZE] = {};
int front = 0, rear = 0;
int flag=0;
void push(int k)
{
if(front==rear && flag == 1)
{
printf("QUEUE is Full\n");
return;
}
queue[front] = k;
front++;
front %= MAXSIZE;
flag = 1;
}
void pop()
{
if(rear==front&&flag==0)
{
printf("QUEUE is Empty\n");
return;
}
printf("Output data is %d\n", queue[rear]);
queue[rear] = 0;
rear++;
rear%=MAXSIZE;
flag = 0;
}
void view()
{
printf("Q list\n");
for(int i=0; i<MAXSIZE; i++)
{
printf("%d\n", queue[i]);
}
printf("--------------\n");
}
int main()
{
int n, k;
for(;;)
{
printf("1: push, 2:pop, 3:view\n");
scanf("%d", &n);
switch(n)
{
case 1:
printf("input data is: ");
scanf("%d", &k);
push(k);
break;
case 2:
pop();
break;
case 3:
view();
break;
default:
printf("ERROR\n");
break;
}
}
}*/
/*#include<stdio.h>
int arr[1001][1001]={},m,n,i,j,a,b,days=0;
int d[100000][2] = {0};
int f()
{
}
int k()
{
}
int main()
{
scanf("%d %d",&m,&n);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&arr[i][j]);
}
}
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
if(arr[i][j]==1)
{
}
}
}
}*/
/*#include<stdio.h>
int i,j,W,H,sum=0;
char arr[101][101]= {};
void dfs(i,j)
{
if(i==-1||i==H||j==-1||j==W)
{
return 0;
}
if(arr[i][j]=='.')
{
return 0;
}
arr[i][j]='.';
dfs(i-1,j-1);
dfs(i-1,j+1);
dfs(i+1,j-1);
dfs(i+1,j+1);
dfs(i,j-1);
dfs(i,j+1);
dfs(i+1,j);
dfs(i-1,j);
}
int main()
{
scanf("%d %d",&W,&H);
for(i=0; i<H; i++)
{
for(j=0; j<W; j++)
{
scanf(" %c",&arr[i][j]);
}
}
for(i=0; i<H; i++)
{
for(j=0; j<W; j++)
{
if(arr[i][j]=='L')
{
dfs(i, j);
sum++;
}
}
}
printf("%d",sum);
return 0;
}
*/



