forked from Ayushsinhahaha/HacktoberFest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBishop.cpp
56 lines (48 loc) · 1.18 KB
/
Bishop.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<bits/stdc++.h>
using namespace std;
#define ll long long
//#define ll int
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pu push
#define db double
#define m_p make_pair
ll mod = 1e9 + 7;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll t;
t=1;
cin>>t;
ll t1=t;
while(t1--)
{
///your code goes here/////
char mat[8][8];
for(int i=0;i<8;i++)
{
for(int j=0;j<8;j++)
cin>>mat[i][j];
}
bool f1=1;
for(int i=1;i<7;i++)
{
for(int j=1;j<7;j++)
{
if(mat[i][j]=='#'&&mat[i-1][j-1]=='#'&&mat[i-1][j+1]=='#'&&mat[i+1][j-1]=='#'&&mat[i+1][j+1]=='#')
{
cout<<i+1<<" "<<j+1<<endl;
f1=0;
break;
}
}
if(f1==0)
break;
}
///code end here/////////////
}
return 0;
}