真不知道我错哪了:
#include<bits/stdc++.h>
using namespace std;
char mp[101][101];
signed main()
{
int t;
cin>>t;
for(int o=1;o<=t;o++)
{
memset(mp,' ',sizeof(mp));
bool flag=false,flagg=false;
cout<<"Case "<<o<<": ";
for(int i=1;i<=5;i++)for(int j=1;j<=5;j++)
{
cin>>mp[i][j];
if(mp[i][j]=='>')
{
flag=true;
if(mp[i][j-1]=='|' || mp[i][j-2]=='|')
{
flagg=true;
cout<<"No Ball\n";
}
}
}
if(!flag)for(int i=1;i<=5;i++)for(int j=1;j<=5;j++)if(mp[i][j]=='<')if(mp[i][j+1]=='|' || mp[i][j+2]=='|')
{
flagg=true;
cout<<"No Ball\n";
}
if(!flagg)cout<<"Thik Ball\n";
}
return 0;
}