제출 #1013674

#제출 시각아이디문제언어결과실행 시간메모리
1013674MardonbekhazratovPaint By Numbers (IOI16_paint)C++17
0 / 100
0 ms348 KiB
#include "paint.h" #include <iostream> #include <vector> using namespace std; int n,k; string solve_puzzle(string s, vector<int>c){ n=s.size(); k=c.size(); int j=0,last=-1; for(int i=0;i<=n;i++){ if(i==n || s[i]=='_'){ while(j<k && i-last-1>=c[j]){ for(int l=last+1;l<last+c[j]+1;l++) s[l]='X'; last=min(i,last+c[j]+1); } last=i; } } for(int i=0;i<n;i++) s[i]=s[i]=='.'?'_':s[i]; return s; }
#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...