제출 #433109

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