Submission #301239

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3012392020-09-17 18:42:12williamMBDKPaint By Numbers (IOI16_paint)C++17
59 / 100
1 ms512 KiB
#include<bits/stdc++.h>
#include "paint.h"
#include <cstdlib>
using namespace std;
const int MN = 100;
int N, K;
string S;
vector<int> C;
vector<vector<int>> dp (MN + 10, vector<int> (101, -1));
vector<bool> x (MN), w(MN);
int rec(int i1, int i2){
if(dp[i1][i2] != -1) return dp[i1][i2];
if(i2 == K){
dp[i1][i2] = 1;
for(int i = i1; i < N; i++){
if(S[i] == 'X'){
dp[i1][i2] = 0;
}
}
if(dp[i1][i2]){
for(int i = i1; i < N; i++){
w[i] = 1;
}
}
return dp[i1][i2];
}
dp[i1][i2] = 0;
for(int i = i1; i + C[i2] - 1 < N; i++){
bool b = 1;
for(int j = i; j < i + C[i2]; j++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...