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
| #include<iostream> using namespace std; int n,foot,jiexian,flag;
int main(){ cin>>n; for(int q=1;q<=n;q++){ char ch; foot=0; jiexian=0; flag=0; for (int i = 1; i <= 5; i++) for (int j = 1; j <= 5; j++){ cin>>ch; if(ch =='|') jiexian=j; else if(ch=='<')flag=1,foot=j; else if(ch=='>')flag=0,foot=j; } cout << "Case "<<q<<": "; if ((flag&&foot<=jiexian)||(flag&&foot<jiexian)) cout << "No Ball\n"; else cout << "Thik Ball\n"; } return 0; }
|