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 <bits/stdc++.h>
using namespace std;
string solve_puzzle(string s, vector<int> c){
int N = s.size();
string ss = string(N, '.');
vector<int> arr(1, 0);
int t = 0;
for(int i : c){
arr.push_back(i+t);
for(int j = t; j < i + t; j ++){
ss[j] = 'X';
}
arr.push_back(i+t+1);
if(t + i < N)
ss[t + i] = '_';
t += i + 1;
}
arr.pop_back();
// for(int i : arr){cout << i << " ";}cout << endl;
int free = N - arr.back();
for(int i : arr){
for(int j = i; j < i + free; j ++){
ss[j] = '?';
}
}
return ss;
}
# | 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... |