# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782184 | BT21tata | Paint By Numbers (IOI16_paint) | C++17 | 241 ms | 84872 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>
#include <cstdlib>
using namespace std;
bool dp1[200005][205], dp2[200005][205];
int n, prx[200005], k, pre[200005], canx[200005], cane[200005];
string ans;
string solve_puzzle(string s, vector<int> c)
{
n=s.length();
k=c.size();
s='0'+s;
c.insert(c.begin(), 0);
for(int i=1; i<=n; i++)
{
if(s[i]=='X') prx[i]=1;
if(s[i]=='_') pre[i]=1;
prx[i]+=prx[i-1];
pre[i]+=pre[i-1];
}
for(int i=1; i<=n; i++)
{
for(int j=1; j<=k; j++)
{
// [i-c[j]+1 ... i]
if(i-c[j]<0) continue;
if(j==1)
{
# | 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... |