# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30496 | abbomar | Paint By Numbers (IOI16_paint) | C++14 | 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 "paint.h"
#include <bits/stdc++.h>
using namespace std;
string solve_puzzle(string s, int k, int c[])
{
string res = s;
int index = 0;
for ( int j = 0 ; j < k ; j ++ )
{
int b = c[j];
for (int i = 0 ; i < b ; i ++ )
{
res[index++] = 'X';
}
res[index++] = '_';
}
for (int i = index ; i < res.size() ; i ++ )
res[i] = '_';
return res;
}