Submission #405058

#TimeUsernameProblemLanguageResultExecution timeMemory
405058MDarioPaint By Numbers (IOI16_paint)C++11
32 / 100
1 ms300 KiB
#include "paint.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second string solve_puzzle(string s, vector<int> c) { ll n=s.size(), k=c.size(), t=0, t1=0; string r=s, r1; for(int i=0; i<k; i++){ if(i!=0){ r[t]='_'; t++; } for(int e=t; e<t+c[i]; e++)r[e]='X'; t+=c[i]; } for(int i=t; i<n; i++)r[i]='?'; t=n-t; r1=r; for(int i=0; i<n-t; i++){ if(r[i]!=r[i-1]||i==0){ t1=0; } else{ t1++; } if(t1<t)r1[i]='?'; } return r1; }
#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...