제출 #377082

#제출 시각아이디문제언어결과실행 시간메모리
377082lakshith_Paint By Numbers (IOI16_paint)C++14
7 / 100
1 ms384 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...