よじろめ覚書

私の理解度重視のソースコードです。

ABC044B - 美しい文字列 / Beautiful Strings

問題:B - 美しい文字列 / Beautiful Strings

#include <iostream>
#include <string>
using namespace std;

#define REP(i, n) for (int i = 0; i < (n); ++i)

int main(void) {
    string s;
    int cnt[26] = {0};
    bool flg = true;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> s;
    REP(i, s.length()) {
        cnt[s[i] - 'a']++;
    }

    REP(i, 26) {
        if (cnt[i] % 2) {
            flg = false;
        }
    }

    cout << (flg? "Yes" : "No") << "\n";
    return 0;
}

"Yes"という出力を"YES"、"No"という出力を"NO"と出力して、1WA