# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1035897 | baldwinhuang1 | Paint By Numbers (IOI16_paint) | C++14 | 0 ms | 348 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 <cstdlib>
#include <bits/stdc++.h>
using namespace std;
string solve_puzzle(string s, vector<int> c) {
string a = s;
string b = s;
for (int i = 0; i < c[0]; i++) {
a[i] = 'X';
}
for (int i = s.size() - 1; i > (s.size() - c[0] - 1); i--) {
b[i] = 'X';
}
for (auto &i: s) {
i = '?';
}
for (int i = 0; i < s.size(); i++) {
if (a[i] == 'X' && b[i] == 'X') {
s[i] = 'X';
}
}
// cout << a << '\n' << b << '\n';
// cout << s << '\n';
return s;
}
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... |