Advertisement
STANAANDREY

Majoritatea (22)

Dec 28th, 2021
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. signed main() {
  5. string s;
  6. getline(cin, s);
  7.  
  8. unordered_map<char, int> fr;
  9. for (const char &ch : s) {
  10. fr[ch]++;
  11. }
  12. if (fr['a'] > s.size() / 2) {
  13. puts("DA");
  14. } else {
  15. puts("NU");
  16. }
  17. return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement