Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- cin>>t;
- while(t--)
- {
- string s;
- int a[5][5];
- int b=0,c=0,i,j;
- for( j=0; j<5; j++)
- for( i=0; i<5; i++)
- cin>>s[i];
- for( i=0; i<5; i++)
- if(a[0][i]=='|')
- {
- b=i;
- break;
- }
- cout<<b<<endl;
- for( j=0; j<5; j++)
- {
- for( i=0; i<5; i++)
- {
- if(a[j][i]=='>' && b<i)
- {
- c=1;
- break;
- }
- else if(a[j][i]=='<' && b>i)
- {
- c=1;
- break;
- }
- }
- }if(c==1)
- cout<<"No Ball"<<endl;
- else
- cout<<"Thik Ball"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement