Submission #137322

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1373222019-07-27 13:00:59mirbek01Paint By Numbers (IOI16_paint)C++11
7 / 100
2 ms376 KiB
#include "paint.h"
//#include "grader.cpp"
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
int pf[3][N], n, m;
int dp[202][N], pref[N], f[202][N], pfX[N], sfX[N];
int get(int l, int r, int tp){
if(l > r) return 0;
return pf[tp][r] - pf[tp][l - 1];
}
int Get(int l, int r, int tp){
if(l > r) return 0;
return f[tp][r] - f[tp][l - 1];
}
string solve_puzzle(string s, vector<int> c) {
n = (int)s.size();
m = (int)c.size();
s = ' ' + s;
for(int i = 1; i <= n; i ++){
if(s[i] == 'X')
pf[0][i] ++, pfX[i] = i;
if(s[i] == '_')
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...