| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1368852 | mariza | Paint By Numbers (IOI16_paint) | C++20 | 1 ms | 344 KiB |
#include "paint.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string solve_puzzle(string s, vector<int> c){
ll n=s.size(), k=c.size();
ll x=k-1;
for(ll i=0; i<k; i++){
x+=c[i];
}
if(x==n){
string ans;
for(ll i=0; i<k; i++){
for(ll j=0; j<c[i]; j++){
ans+='X';
}
if(i<k-1) ans+='_';
}
return ans;
}
string ans;
for(ll i=0; i<n; i++){
ll l=0, j=0;
while(j<k && l+c[j]<=i){
l+=c[j]+1;
j++;
}
ll y=k-j-1;
while(j<k){
y+=c[j];
j++;
}
if(y<=n-1-i) ans+='?';
else ans+='X';
}
return ans;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
