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>
#include <cstdlib>
typedef long long int ll;
using namespace std;
string solve_puzzle(std::string s, std::vector<int> c) {
string str="";
ll n=s.length();
string a[n+1];
ll cnt=0;
str=s;
ll flag=0;
for(int i =0;i<n;i++)
{
str=s;
if(c[0]+i<=n)
{
for(int j =i;j<c[0]+i;j++)
{
str[j]='X';
}
a[cnt]=str;
cnt++;
}
}
str=s;
for(int i =0;i<n;i++)
{
for(int j =0;j<cnt-1;j++)
{
if(a[j][i]!=a[j+1][i])
{
flag=1;
}
}
if(flag==0)
{
str[i]='X';
}
else
{
str[i]='?';
}
flag=0;
}
return str;
}
# | 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... |