# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1058991 | TAhmed33 | Paint By Numbers (IOI16_paint) | C++98 | 0 ms | 444 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 "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
string solve_puzzle (string s, vector <int> c) {
int n = s.length(), k = c.size();
c.insert(c.begin(), 0);
c.push_back(0);
vector <vector <int>> p(2, vector <int> (n + 2, 0));
vector <vector <int>> h(2, vector <int> (n + 2, 0));
vector <vector <int>> f(k + 2, vector <int> (n + 2, 0));
vector <vector <int>> g(k + 2, vector <int> (n + 2, 0));
for (int i = 0; i < n; i++) {
if (s[i] == '_') p[0][i + 1]++;
if (s[i] == 'X') p[1][i + 1]++;
}
for (int i = 1; i <= n + 1; i++) {
p[0][i] += p[0][i - 1];
p[1][i] += p[1][i - 1];
}
f[0][0] = 1;
for (int i = 1; i <= k; i++) {
for (int j = 1; j <= n + 1; j++) {
# | 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... |