Submission #598842

#TimeUsernameProblemLanguageResultExecution timeMemory
598842fuad27Paint By Numbers (IOI16_paint)C++17
7 / 100
1 ms212 KiB
#include<bits/stdc++.h> #include "paint.h" using namespace std; #define rep(i,a,b) for(int i=int(a);i<int(b);i++) string solve_puzzle(string s, vector<int> c) { int n=s.size(),k=c.size(); string ans=""; rep(i,0,n)ans.push_back('X'); int extra=n+1; rep(i,0,k)extra-=c[i]+1; int sum=0; rep(i,0,k) { rep(j,sum,sum+extra)ans[j]='?'; if(extra==0 and sum)ans[sum]='_'; sum+=c[i]; rep(j,sum,sum+extra)ans[j]='?'; sum++; } return ans; }
#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...