# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
819390 | jlallas384 | Paint By Numbers (IOI16_paint) | C++17 | 1 ms | 256 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;
std::string solve_puzzle(std::string s, std::vector<int> c) {
int n = s.size(), k = c.size();
int f = c[0];
vector<int> ans(n, 1);
for(int i = 0; i + f - 1 < n; i++){
string res = "";
for(int j = 0; j < n; j++){
if(i <= j && j <= i + f - 1){
res += 'X';
}else{
res += '?';
}
}
for(int j = 0; j < n; j++){
if(res[j] == '?') ans[j] = 0;
}
}
string res = "";
for(int x: ans){
res += "?X"[x];
}
assert('?' == (char) (63));
assert('X' == (char) (88));
return res;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |