やるだけ。
class CubeStickers { public: string isPossible(vector <string> S) { map<string, int> cnt; for (int i = 0; i < (int)S.size(); ++i) { ++cnt[S[i]]; } int mul = 0; FOR (i, cnt) { if (1 < cnt[i->first]) ++mul; } cout << cnt.size() << endl; cout << mul << endl; if (6 <= cnt.size()) return "YES"; if (cnt.size() == 5 && 6 <= S.size()) return "YES"; if (cnt.size() == 4 && 2 <= mul) return "YES"; if (cnt.size() == 3 && 3 <= mul) return "YES"; return "NO"; } };