Untitled
unknown
plain_text
a year ago
703 B
6
Indexable
#include <iostream> #include <map> typedef long long ll; using namespace std; map<char, int> mp; int main(){ freopen("BAI3.INP","r",stdin); freopen("BAI3.OUT","w",stdout); int q; cin >> q; while(q--){ int n, k = 0; cin >> n; while(n--){ string s; cin >> s; for(int i = 0; i < s.size(); i++){ if(mp[s[i]] == 0) mp[s[i]]++; else mp[s[i]]--; } } for(auto it : mp){ if(it.second){ k++; break; } } if(k) cout << "NO" << endl; else cout << "YES" << endl; } return 0; }
Editor is loading...
Leave a Comment