Promi_38

cf 409A

Jan 12th, 2021
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main()
  5. {
  6.     char s1[30], s2[30];
  7.     scanf("%s %s", s1, s2);
  8.    
  9.     int c1 = 0, c2 = 0;
  10.     for(int i = 0; i < strlen(s1); i += 2)
  11.     {
  12.         if(s1[i] == '[' && s2[i] == '8') c2++;
  13.         if(s2[i] == '[' && s1[i] == '8') c1++;
  14.         if(s1[i] == '[' && s2[i] == '(') c1++;
  15.         if(s2[i] == '[' && s1[i] == '(') c2++;
  16.         if(s1[i] == '8' && s2[i] == '(') c2++;
  17.         if(s2[i] == '8' && s1[i] == '(') c1++;
  18.     }
  19.     if(c1 > c2) printf("TEAM 1 WINS\n");
  20.     else if(c1 < c2) printf("TEAM 2 WINS\n");
  21.     else printf("TIE\n");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment