# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
92606 | Badral | Paint By Numbers (IOI16_paint) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int a[1000005];
string solve_puzzle(string s, int[] c) {
int k = c[0];
for(int i = 0; i < k; i++) a[i]++;
for(int i = s.size(); i >= s.size()-k; i--) a[i]++;
string sss;
for(int i = 0; i < s.size(); i++) {
if(a[i] == 2) sss += 'X';
else sss += '?';
}
return sss;
}