Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t;
- cin>>t;
- while(t--)
- {
- int n;
- cin>>n;
- vector<string> v(n);
- for(auto &e: v) cin>>e;
- map<string, int> mp;
- for(auto e: v)
- mp[e]++;
- int ans = max(mp["O"]+mp["A"]+mp["AB"],
- mp["O"]+mp["B"]+mp["AB"]);
- cout<<ans<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment