This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |