Submission #592190

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5921902022-07-08 18:12:44AlperenTPaint By Numbers (IOI16_paint)C++17
59 / 100
2 ms1364 KiB
#include <bits/stdc++.h>
#include "paint.h"
using namespace std;
const int N = 2e5 + 5, K = 100 + 5, INF = 1e9 + 5;
int n, k, forcedwhite[N], forcedblack[N], posprefix[K][N], isgood[K][N], white[N], black[N], closest[K][N];
bool pos[K][N];
void update(int arr[N], int l, int r){
arr[l]++, arr[r + 1]--;
}
string solve_puzzle(string s, vector<int> c) {
n = s.size(), k = c.size();
s = " " + s, c.insert(c.begin(), 0);
int firstx = INF;
for(int i = 1; i <= n; i++){
forcedblack[i] = forcedblack[i - 1];
forcedwhite[i] = forcedwhite[i - 1];
if(s[i] == 'X'){
forcedblack[i] = i;
if(firstx == INF) firstx = 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...