Lexicographically smallest binary string formed by flipping bits at indices not divisible K1 or K2 such that count of 1s is always greater than 0s from left

  #include using namespace std;  void generateString(int k1, int k2, string s){            int C1s = 0, C0s = 0;    int flag = 0;    vector pos;          for (int i = 0; i < s.length(); i++) {          if (s[i] == '0') {            C0s++;                                      if ((i + 1) % k1 != 0                && (i + 1) % k2 != 0) {                pos.push_back(i);            }        }          else {            C1s++;        }          if (C0s >= C1s) {                                                  if (pos.size() == 0) {                cout