# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
592190 | AlperenT | Paint By Numbers (IOI16_paint) | C++17 | 2 ms | 1364 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>
#include "paint.h"
using namespace std;
const int N = 2e5 + 5, K = 100 + 5, INF = 1e9 + 5;
int n, k, forcedwhite[N], forcedblack[N], posprefix[K][N], isgood[K][N], white[N], black[N], closest[K][N];
bool pos[K][N];
void update(int arr[N], int l, int r){
arr[l]++, arr[r + 1]--;
}
string solve_puzzle(string s, vector<int> c) {
n = s.size(), k = c.size();
s = " " + s, c.insert(c.begin(), 0);
int firstx = INF;
for(int i = 1; i <= n; i++){
forcedblack[i] = forcedblack[i - 1];
forcedwhite[i] = forcedwhite[i - 1];
if(s[i] == 'X'){
forcedblack[i] = i;
if(firstx == INF) firstx = i;
}
# | 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... |