Submission #1058991

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10589912024-08-14 15:45:58TAhmed33Paint By Numbers (IOI16_paint)C++98
0 / 100
0 ms444 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 + 2, 0));
vector <vector <int>> h(2, vector <int> (n + 2, 0));
vector <vector <int>> f(k + 2, vector <int> (n + 2, 0));
vector <vector <int>> g(k + 2, vector <int> (n + 2, 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++) {
for (int j = 1; j <= n + 1; 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...