Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char edge[100][100];
- int main()
- {
- //seive();
- //freopen("Nayem.txt", "r", stdin);
- Fast_read
- ll n;
- cin>>n;
- for (int i=0;i<n;i++)
- {
- for (int j=0;j<n;j++)
- {
- cin>>edge[i][j];
- }
- }
- for (int i=1;i<n-1;i++)
- {
- for (int j=1;j<n-1;j++)
- {
- if (edge[i][j]=='.' && edge[i-1][j]=='.' && edge[i+1][j]=='.' && edge[i][j-1]=='.' && edge[i][j+1]=='.')
- {
- edge[i][j]='#';
- edge[i+1][j]='#';
- edge[i-1][j]='#';
- edge[i][j+1]='#';
- edge[i][j-1]='#';
- }
- }
- }
- for (int i=0;i<n;i++)
- {
- for (int j=0;j<n;j++)
- {
- if (edge[i][j]=='.')
- {
- cout<<"NO"<<endl;
- return 0;
- }
- }
- }
- cout<<"YES"<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement