Submission #1059242

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10592422024-08-14 19:36:40TAhmed33Paint By Numbers (IOI16_paint)C++98
59 / 100
1 ms348 KiB
#include "paint.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
string solve_puzzle (string s, vector <int> c) {
int n = s.length(), k = c.size();
c.insert(c.begin(), 0);
c.push_back(0);
vector <vector <int>> p(2, vector <int> (n + 4, 0));
vector <vector <int>> h(2, vector <int> (n + 4, 0));
vector <vector <int>> f(k + 2, vector <int> (n + 4, 0));
vector <vector <int>> g(k + 2, vector <int> (n + 4, 0));
vector <vector <int>> good(k + 2, vector <int> (n + 4, 0));
for (int i = 0; i < n; i++) {
if (s[i] == '_') p[0][i + 1]++;
if (s[i] == 'X') p[1][i + 1]++;
}
for (int i = 1; i <= n + 1; i++) {
p[0][i] += p[0][i - 1];
p[1][i] += p[1][i - 1];
}
f[0][0] = 1;
for (int i = 1; i <= k; 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...