Submission #798690

#TimeUsernameProblemLanguageResultExecution timeMemory
798690LiudasPaint By Numbers (IOI16_paint)C++17
32 / 100
1 ms316 KiB
#include <bits/stdc++.h> using namespace std; string solve_puzzle(string s, vector<int> c){ int N = s.size(); string ss = string(N, '.'); vector<int> arr(1, 0); int t = 0; for(int i : c){ arr.push_back(i+t); for(int j = t; j < i + t; j ++){ ss[j] = 'X'; } arr.push_back(i+t+1); if(t + i < N) ss[t + i] = '_'; t += i + 1; } arr.pop_back(); // for(int i : arr){cout << i << " ";}cout << endl; int free = N - arr.back(); for(int i : arr){ for(int j = i; j < i + free; j ++){ ss[j] = '?'; } } return ss; }
#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...