Submission #792957

#TimeUsernameProblemLanguageResultExecution timeMemory
792957ShithilaPaint By Numbers (IOI16_paint)C++14
7 / 100
1 ms316 KiB
#include "paint.h" #include <cstdlib> #include <vector> #include <iostream> #include <algorithm> using namespace std; std::string solve_puzzle(std::string s, std::vector<int> c) { int n=s.size(); string front=s; string back=s; for(int i=0;i<c[0];i++) { front[i]='X'; back[n-1-i]='X' ; } for(int i=0;i<n;i++) { if(back[i]=='.' || front[i]=='.' ) { s[i]='?'; } else s[i]='X'; } 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...