Saleh127

UVA 13091

Jun 1st, 2021 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main()
  5. {
  6. ios_base::sync_with_stdio(0);
  7. cin.tie(0);
  8. cout.tie(0);
  9.  
  10. int t;
  11. cin>>t;
  12. for(int cs=1; cs<=t; cs++)
  13. {
  14. char a[10][10];
  15.  
  16. ll i,j,k=-1,l=-1,m=-1,n;
  17.  
  18.  
  19. for(i=0;i<5;i++)
  20. {
  21. for(j=0;j<5;j++)
  22. {
  23. cin>>a[i][j];
  24. if(a[i][j]=='|')
  25. {
  26. l=j;
  27. }
  28. if(a[i][j]=='>')
  29. {
  30. k=j;
  31. }
  32. if(a[i][j]=='<')
  33. {
  34. m=j;
  35. }
  36.  
  37. }
  38. }
  39.  
  40. cout<<"Case "<<cs<<": ";
  41.  
  42. if(k>=0 && k>l) cout<<"No Ball"<<endl;
  43. else if(m>=0 && m<l) cout<<"No Ball"<<endl;
  44. else cout<<"Thik Ball"<<endl;
  45.  
  46.  
  47. }
  48.  
  49. return 0;
  50. }
  51.  
Add Comment
Please, Sign In to add comment