Submission #44959

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
449592018-04-10 04:58:13RayaBurong25_1Paint By Numbers (IOI16_paint)C++17
59 / 100
3 ms836 KiB
#include "paint.h"
#include <cstdlib>
#include <cassert>
#include <stdio.h>
int mustB[200005];
int QmustW[200005];
int Pre[200005][105];
int canEnd[200005][105];
int QcanEnd[200005][105];
int Suf[200005][105];
int canW[200005];
int canB[200005];
std::string Ans;
int min(int a, int b)
{
return (a < b)?a:b;
}
std::string solve_puzzle(std::string s, std::vector<int> c) {
int i, j, l, n = s.size(), k = c.size();
for (i = 1; i <= n; i++)
{
mustB[i] = (s[i - 1] == 'X');
QmustW[i] = (s[i - 1] == '_') + QmustW[i - 1];
}
// printf("Pre\n");
for (i = 0; i <= n; i++)
{
for (j = 0; j <= k; j++)
{
if (i == 0 && j == 0)
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

paint.cpp: In function 'std::__cxx11::string solve_puzzle(std::__cxx11::string, std::vector<int>)':
paint.cpp:19:15: warning: unused variable 'l' [-Wunused-variable]
     int i, j, l, n = s.size(), k = c.size();
               ^
#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...