やるだけ
class EasyConversionMachine { public: string isItPossible(string O, string F, int k) { const int size = O.size(); int cnt = 0; for (int i = 0; i < size; ++i) { cnt += (O[i] != F[i]); } const string S = "POSSIBLE"; const string T = "IMPOSSIBLE"; if (cnt > k) return T; if ((cnt - k) % 2 == 0) return S; return T; } };