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;
string solve_single(string s,int c){
int n = s.length();
int w[n],b[n];
memset(w,0,sizeof(w));
memset(b,0,sizeof(b));
for(int i=0;i<n;i++)b[i]=w[i]=1;
int r =c-1;
int l = n-c;
for(int i=l;i<=r;i++)w[i]=0;
string ans = "";
for(int i=0;i<n;i++)
if(w[i]+b[i]==2)ans+="?";
else ans += (w[i]==1?"_":"X");
return ans;
}
string solve_puzzle(string s,vector<int> c){
/* int n=s.length(),m=c.size();
int w[n],b[n];
memset(w,0,sizeof(w));
memset(b,0,sizeof(b));*/
return solve_single(s,c[0]);
}
# | 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... |