Submission #782184

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7821842023-07-13 16:10:21BT21tataPaint By Numbers (IOI16_paint)C++17
100 / 100
241 ms84872 KiB
#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)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...