CSES - Datatähti 2021 alku - Results
Submission details
Task:Arpakuutiot
Sender:Guuber
Submission time:2020-10-02 15:06:22 +0300
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:936:7: error: expected primary-expression before 'if'
       if(s[y-2][x] != '.'){
       ^~
input/code.cpp:938:8: error: expected '}' before 'else'
       }else if(s[y+1][x-2] != '.'){
        ^~~~
input/code.cpp:1141:5: error: 'else' without a previous 'if'
     else if(s[y+1][x] != '.' && s[y][x-1] != '.' && s[y][x+1] != '.'){
     ^~~~
input/code.cpp:1141:15: error: 'y' was not declared in this scope
     else if(s[y+1][x] != '.' && s[y][x-1] != '.' && s[y][x+1] != '.'){
               ^
input/code.cpp:1141:20: error: 'x' was not declared in this scope
     else if(s[y+1][x] != '.' && s[y][x-1] != '.' && s[y][x+1] != '.'){
                    ^
input/code.cpp:1142:6: error: 'a' was not declared in this scope
      a++;
      ^
input/code.cpp:1167:8: error: 'b' was not declared in this scope
        b++;
        ^
input/code.cpp:1176:8: error: 'b' was not declared in this scope
        b++;
        ^
input/code.cpp:118...

Code

#include<bits/stdc++.h>
using namespace std;

char s[10][10];
int z[10][10];

int n;
int paallac, edessac, takanac, alhaallac, vasemmallac, oikeallac;
int main(){
        cin >> n;
		int countteri = 0;
        for(int ss = 0; ss < n; ss++){
                for(int i = 1; i <= 5; i++){
                        for(int j = 1; j <= 5; j++){
                                cin >> s[i][j];
                        }
                }
                for(int i = 0; i <= 6; i++){
                        s[i][0] = '.';
                        s[0][i] = '.';
                        s[i][6] = '.';
                        s[6][i] = '.';
                }
                for(int i = 0; i <= 6; i++){
                        for(int j = 0; j <= 6; j++){
                                cout << s[i][j];
                        }
                        cout << "\n";
                }
                int x,y;
                for(int i = 1; i <= 5; i++){
                        for(int j = 1; j <= 5; j++){
                                if(s[i][j] != '.'){
                                        int a = 0;
                                        a += s[i-1][j] != '.';
                                        a += s[i+1][j] != '.';
                                        a += s[i][j+1] != '.';
                                        a += s[i][j-1] != '.';
                                        if( a >= 3){
                                                y = i;
                                                x = j;
                                        }
                                }
                        }
                }
       //         cout << y << " " << x << "\n";
	   
				int a = 0;
				int b = 0;
			
                if(s[y-1][x] != '.' && s[y+1][x] != '.' && s[y][x-1]!= '.' && s[y][x+1] != '.'){
					a++;
                        // NELJÄLLÄ PUOLELLA

                        if(s[y-2][x] != '.'){
                                /*  .
                                    .
                                   ...
                                    .
                                */
								paallac = s[y-2][x];
								edessac = s[y-1][x];
								takanac = s[y+1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
								
                        }else if(s[y+2][x] != '.'){
                                /*
                                   .
                                  ...
                                   .
                                   .
                                */
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
                        }else if(s[y][x+2] != '.'){
                                /*
                                 .
                                ....
                                 .
                                */
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
                        }else if(s[y][x-2] != '.'){
                                /*
                                  .
                                ....
                                  .
                                */
								paallac = s[y][x-2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
                        }
                }
                else if(s[y-1][x] != '.' && s[y+1][x] != '.' && s[y][x-1] != '.'){
					a++;
					// YLHÄÄLLÄ, ALHAALLA, VASEMMALLA
					/*
					.....
					..1..
					.1A..
					..1..
					.....
					*/

					if(s[y-1][x+1] != '.'){
								/*
								.....
								..11.
								.1A..
								..1..
								.....
								*/
								
							if(s[y+2][x] != '.'){
								/*
								.....
								..11.
								.1A..
								..1..
								..1..
								*/	
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x+1];
								b++;
							}else if(s[y-2][x+1] != '.'){
								/*
								...1.
								..11.
								.1A..
								..1..
								.....
								*/
								paallac = s[y-2][x+1];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x+1];
								b++;
							}else if(s[y-1][x+1] != '.'){
								
							}else if(s[y][x-2] != '.'){
								/*
								.....
								..11.
								11A..
								..1..
								.....
								*/
								paallac = s[y][x-2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x+1];
								b++;
							}else if(s[y-2][x] != '.'){
								/*
								..1..
								..11.
								.1A..
								..1..
								.....
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x+1];
								b++;
							}
					}else if(s[y+1][x+1] != '.'){
							/*
							.....
							..1..
							.1A..
							..11.
							.....
							*/
							
						if(s[y+1][x+2] != '.'){
							
						}else if(s[y+2][x+1] != '.'){
							/*
							.....
							..1..
							.1A..
							..11.
							...1.
							*/
							paallac = s[y+1][x+1];
							edessac = s[y+1][x];
							takanac = s[y][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y+2][x+1];
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							.....
							..1..
							.1A..
							..11.
							..1..
							*/
							paallac = s[y+2][x];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y+1][x+1];
							b++;
						}else if(s[y][x-2] != '.'){
							/*
							.....
							..1..
							11A..
							..11.
							.....
							*/
							paallac = s[y][x-2];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y+1][x+1];
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							..1..
							..1..
							.1A..
							..11.
							.....
							*/
							paallac = s[y-2][x];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y+1][x+1];
							b++;
						}
							
					}
					if(s[y-2][x] != '.'){
								/*
								..1..
								..1..
								.1A..
								..1..
								.....
								*/
							
							if(s[y-2][x+1] != '.'){
								/*
								..11.
								..1..
								.1A..
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-2][x+1];
								b++;
							}else if(s[y-1][x+1]!= '.'){
								/*
								..1..
								..11.
								.1A..
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x+1];
								b++;

							}else if(s[y][x+1] != '.'){
								/*
								..1..
								..1..
								.1A1.
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+1][x+1] != '.'){
								/*
								..1..
								..1..
								.1A..
								..11.
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y+1][x+1];
								b++;
							}else if(s[y+2][x] != '.'){
								
							}else if(s[y][x-2] != '.'){
								
							}
					}else if(s[y+2][x] != '.'){
								/*
								.....
								..1..
								.1A..
								..1..
								..1..
								*/
								

							if(s[y-2][x] != '.'){
								
							}else if(s[y+2][x+1] != '.'){
								/*
								.....
								..1..
								.1A..
								..1..
								..11.
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y+2][x+1];
								b++;
							}else if(s[y+1][x+1] != '.'){
								/*
								.....
								..1..
								.1A..
								..11.
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y+1][x+1];
								b++;
							}else if(s[y][x+1] != '.'){
								/*
								.....
								..1..
								.1A1.
								..1..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y-1][x+1] != '.'){
								/*
								.....
								..11.
								.1A..
								..1..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y-1][x];
								b++;
							}else if(s[y][x-2] != '.'){

							}
					}else if(s[y][x-2] != '.'){
							/*
							.....
							..1..
							11A..
							..1..
							.....
							*/
						if(s[y-2][x] != '.'){
							
						}else if(s[y-1][x+1] != '.'){
							/*
							.....
							..11.
							11A..
							..1..
							.....
							*/
							paallac = s[y][x-2];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y-1][x+1];
							b++;
						}else if(s[y][x+1] != '.'){
							/*
							.....
							..1..
							11A1.
							..1..
							.....
							*/
							paallac = s[y][x-2];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y][x+1];
							b++;
						}else if(s[y+1][x+1] != '.'){
							/*
							.....
							..1..
							11A..
							..11.
							.....
							*/
							paallac = s[y][x-2];
							edessac = s[y+1][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y][x+1];
							b++;
						}else if(s[y+2][x] != '.'){
							
						}else if(s[y][x-3] != '.'){
						
						}
					}
                }else if(s[y-1][x] != '.' && s[y+1][x] != '.' && s[y][x+1] != '.'){
							/*
							.....
							..1..
							..A1.
							..1..
							.....
							*/

                        if(s[y-1][x-1] != '.'){
								/*
								.....
								.11..
								..A1.
								..1..
								.....
								*/
								
							if(s[y-1][x-2] != '.'){
								
							}else if(s[y-2][x-1] != '.'){
								/*
								.1...
								.11..
								..A1.
								..1..
								.....
								*/
								paallac = s[y-2][x-1];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y-2][x] != '.'){
								/*
								..1..
								.11..
								..A1.
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x+2] != '.'){
								/*
								.....
								.11..
								..A11
								..1..
								.....
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+2][x] != '.'){
								/*
								.....
								.11..
								..A1.
								..1..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}
						}else if(s[y+1][x-1] != '.'){
								/*
								.....
								..1..
								..A1.
								.11..
								.....
								*/
								
							if(s[y-1][x] != '.'){
								/*
								..1..
								..1..
								..A1.
								.11..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x+2] != '.'){
								/*
								.....
								..1..
								..A11
								.11..
								.....
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+2][x] != '.'){
								/*
								.....
								..1..
								..A1.
								.11..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+2][x+1] != '.'){
								/*
								.....
								..1..
								..A1.
								.11..
								.1...
								*/
								paallac = s[y+2][x-1];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+1][x+2] != '.'){
								
							}
						}else if(s[y][x+2] != '.'){
								/*
								.....
								..1..
								..A11
								..1..
								.....
								*/
							if(s[y-2][x] != '.'){
							
							}else if(s[y-1][x-1] != '.'){
								/*
								.....
								.11..
								..A11
								..1..
								.....
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+1][x-1] != '.'){
								/*
								.....
								..1..
								..A11
								.11..
								.....
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x+3] != '.'){
								/*
								......
								..1...
								..A111
								..1...
								......
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x+3];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+2][x] != '.'){

							}else if(s[y][x-1] != '.'){
								/*
								.....
								..1..
								.1A11
								..1..
								.....
								*/
								paallac = s[y][x+2];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
							}
						}else if(s[y+2][x] != '.'){
								/*
								.....
								..1..
								..A1.
								..1..
								..1..
								*/

							if(s[y+2][x-1] != '.'){
								/*
								.....
								..1..
								..A1.
								..1..
								.11..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+2][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+1][x-1] != '.'){
								/*
								.....
								..1..
								..A1.
								.11..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x-1]!= '.'){
								/*
								.....
								..1..
								.1A1.
								..1..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y-1][x-1] != '.'){
								/*
								.....
								.11..
								..A1.
								..1..
								..1..
								*/
								paallac = s[y+2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x+2]!= '.'){
								
							}
						}else if(s[y-2][x] != '.'){
								/*
								..1..
								..1..
								..A1.
								..1..
								.....
								*/
								
							if(s[y-2][x-1] != '.'){
								/*
								.11..
								..1..
								..A1.
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-2][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y-1][x-1] != '.'){
								/*
								..1..
								.11..
								..A1.
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y-1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x-1] != '.'){
								/*
								..1..
								..1..
								.1A1.
								..1..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y+1][x-1] != '.'){
								/*
								..1..
								..1..
								..A1.
								.11..
								.....
								*/
								paallac = s[y-2][x];
								edessac = s[y+1][x];
								takanac = s[y-1][x];
								alhaallac = s[y][x];
								vasemmallac = s[y+1][x-1];
								oikeallac = s[y][x+1];
								b++;
							}else if(s[y][x+2] != '.'){
							
							}
						}
				}
                else if(s[y-1][x] != '.' && s[y][x-1] != '.' && s[y][x+1] != '.'){
					a++;
					
                        // YLHÄÄLLÄ; VASEMMALLA; OIKEALLA
						/*
						.....
						..1..
						.1A1.
						.....
						.....
						*/
					
					if(s[y-2][x] != '.'){
							/*
							..1..
							..1..
							.1A1.
							.....
							.....
							*/
						if(s[y-3][x] != '.'){
							/*
							..1..
							..1..
							..1..
							.1A1.
							.....
							.....
							*/
							paallac = s[y-2][x];
							edessac = s[y-3][x];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y][x+1];
							b++;
						}else if(s[y][x+2] != '.'){
							
						}else if(s[y][x-2] != '.'){
							
						}else if(s[y+1][x+1] != '.'){
							/*
							..1..
							..1..
							.1A1.
							...1.
							.....
							*/
							paallac = s[y-2][x];
							edessac = s[y+1][x+1];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y][x+1];
							b++;
						}else if(s[y+1][x-1] != '.'){
							/*
							..1..
							..1..
							.1A1.
							.1...
							.....
							*/
							paallac = s[y-2][x];
							edessac = s[y+1][x-1];
							takanac = s[y-1][x];
							alhaallac = s[y][x];
							vasemmallac = s[y][x-1];
							oikeallac = s[y][x+1];
							b++;
						}
					}else if(s[y][x-2] != '.'){
							/*
							.....
							..1..
							11A1.
							.....
							.....
							*/
							paallac = 
							edessac = 
							takanac = 
							alhaallac = 
							vasemmallac = 
							oikeallac = 
						if(s[y-2][x] != '.'){

						}else if(s[y+1][x-2] != '.'){
							/*
							.....
							..1..
							11A1.
							1....
							.....
							*/
							b++;

						}else if(s[y+1][x-1] != '.'){
							/*
							.....
							..1..
							11A1.
							.1...
							.....
							*/
							b++;
						}else if(s[y+1][x] != '.'){
							/*
							.....
							..1..
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y+1][x+1] != '.'){
							/*
							.....
							..1..
							11A1.
							...1.
							.....
							*/
							b++;
						}
					}else if(s[y][x+2] != '.'){
							/*
							.....
							..1..
							.1A11
							.....
							.....
							*/
						if(s[y-2][x] != '.'){
							/*
							..1..
							..1..
							.1A11
							.....
							.....
							*/
							b++;
						}else if(s[y+1][x-1] != '.'){
							/*
							.....
							..1..
							.1A11
							.1...
							.....
							*/
							b++;
						}else if(s[y+1][x] != '.'){
							/*
							.....
							..1..
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y+1][x+1] != '.'){
							/*
							.....
							..1..
							.1A11
							...1.
							.....
							*/
							b++;
						}else if(s[y+1][x+2] != '.'){
							/*
							.....
							..1..
							.1A11
							.....
							.....
							*/
							b++;
						}
					}else if(s[y+1][x+1] != '.'){
							/*
							.....
							..1..
							.1A1.
							...1.
							.....
							*/
							b++;
						if(s[y-2][x] != '.'){
							/*
							..1..
							..1..
							.1A1.
							...1.
							.....
							*/
							b++;
						}else if(s[y][x-2] != '.'){
							/*
							.....
							..1..
							11A1.
							...1.
							.....
							*/
							b++;
						}else if(s[y][x+2] != '.'){
							/*
							.....
							..1..
							.1A11
							...1.
							.....
							*/
							b++;
						}else if(s[y+1][x+2] != '.'){
							/*
							.....
							..1..
							.1A1.
							...11
							.....
							*/
							b++;
						}else if(s[y+2][x+1] != '.'){
							/*
							.....
							..1..
							.1A1.
							...1.
							...1.
							*/
							b++;
						}							
					}else if(s[y+1][x-1] != '.'){
							/*
							.....
							..1..
							.1A1.
							.1...
							.....
							*/
						if(s[y][x-2] != '.'){
							/*
							.....
							..1..
							11A1.
							.1...
							.....
							*/
							b++;
						}else if(s[y][x+2] != '.'){
							/*
							.....
							..1..
							.1A11
							.1...
							.....
							*/
							b++;
						}else if(s[y+1][x-2] != '.'){
							/*
							.....
							..1..
							.1A1.
							11...
							.....
							*/
							b++;
						}else if(s[y+2][x-1] != '.'){
							/*
							.....
							..1..
							.1A1.
							.1...
							.1...
							*/
							b++;
						}else if(s[y-2][x] != '.'){
							/*
							..1..
							..1..
							.1A1.
							.1...
							.....
							*/
							b++;
						}
					}
				}
				else if(s[y+1][x] != '.' && s[y][x-1] != '.' && s[y][x+1] != '.'){
					a++;
                        // ALHAALLA VASEMMALLA OIKEALLA
						/*
						.....
						.....
						.1A1.
						..1..
						.....
						*/
					if(s[y+2][x] != '.'){
							/*
							.....
							.....
							.1A1.
							..1..
							..1..
							*/
						if(s[y-1][x] != '.'){
							/*
							.....
							..1..
							.1A1.
							..1..
							..1..
							*/
							b++;
						}else if(s[y-1][x-1] != '.'){
							/*
							.....
							.1...
							.1A1.
							..1..
							..1..
							*/
							b++;
						}else if(s[y-1][x+1] != '.'){
							/*
							.....
							...1.
							.1A1.
							..1..
							..1..
							*/
							b++;
						}else if(s[y+3][x] != '.'){
							/*
							.....
							.....
							.1A1.
							..1..
							..1..
							..1..
							*/
							b++;
						}else if(s[y][x-2] != '.'){
							/*
							.....
							.....
							11A1.
							..1..
							..1..
							*/
							b++;
						}else if(s[y][x+2] != '.'){
							/*
							.....
							.....
							.1A11
							..1..
							..1..
							*/
							b++;
						}
					}else if(s[y][x-2] != '.'){
							/*
							.....
							.....
							11A1.
							..1..
							.....
							*/
						if(s[y-1][x-2] != '.'){
							/*
							.....
							1....
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x-1] != '.'){
							/*
							.....
							.1...
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x] != '.'){
							/*
							.....
							..1..
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x+1] != '.'){
							/*
							.....
							...1.
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							.....
							.....
							11A1.
							..1..
							..1..
							*/
							b++;
						}
					}else if(s[y][x+2] != '.'){
							/*
							.....
							.....
							.1A11
							..1..
							.....
							*/
						
						if(s[y-1][x-1] != '.'){
							/*
							.....
							.1...
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x] != '.'){
							/*
							.....
							..1..
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x+1] != '.'){
							/*
							.....
							...1.
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x+2] != '.'){
							/*
							.....
							....1
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							.....
							.....
							.1A11
							..1..
							..1..
							*/
							b++;
						}
						
					}else if(s[y-1][x-1] != '.'){
							/*
							.....
							.1...
							.1A1.
							..1..
							.....
							*/
							
						if(s[y-2][x-1] != '.'){
							/*
							.1...
							.1...
							.1A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x-2] != '.'){
							/*
							.....
							11...
							.1A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y][x-2] != '.'){
							/*
							.....
							.1...
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y][x+2] != '.'){
							/*
							.....
							.1...
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							.....
							.1...
							.1A1.
							..1..
							..1..
							*/
							b++;
						}
					}else if(s[y-1][x+1] != '.'){
							/*
							.....
							...1.
							.1A1.
							..1..
							.....
							*/
						if(s[y-2][x+1] != '.'){
							/*
							...1.
							...1.
							.1A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y][x-2] != '.'){
							/*
							.....
							...1.
							11A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y][x+2] != '.'){
							/*
							.....
							...1.
							.1A11
							..1..
							.....
							*/
							b++;
						}else if(s[y-1][x+2] != '.'){
							/*
							.....
							...11
							.1A1.
							..1..
							.....
							*/
							b++;
						}else if(s[y+2][x] != '.'){
							/*
							.....
							...1.
							.1A1.
							..1..
							..1..
							*/
							b++;
						}
					}
                }
				if(b == 1){
					countteri++;
				}
        }
		if(countteri == n){
			return 1;
		}else{
			cout << "vaarin\n";
		}
}