Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string arr[1000],
- c1 = "A",
- c2 = "B",
- c3 = "C";
- int a ,
- r1 ,
- r2 ,
- r3 ,
- resu ;
- /////////////////////////////////
- int main() //
- {
- cin >> a;
- for(int y = 0; y < a; y++)
- {
- cin >> arr[y];
- for(int i = 0; i < a; i++)
- {
- if(arr[i] == c1) r1 += 1;
- if(arr[i] == c2) r2 += 1;
- if(arr[i] == c3) r3 += 1;
- cout << r1 << r2 << r3;
- }
- if(r2 - r1 > 0) resu = r2 - r1;
- else
- {
- cout << "NO";
- continue;
- }
- if(resu - r3 == 0)
- {
- cout << "YES";
- continue;
- }
- else cout << "NO";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement