Submission #30500

#TimeUsernameProblemLanguageResultExecution timeMemory
30500abbomarPaint By Numbers (IOI16_paint)C++14
0 / 100
0 ms2216 KiB
#include "paint.h" #include <bits/stdc++.h> using namespace std; string solve_puzzle(string s, vector<int> c) { string res = s; int index = 0; for ( int b : c ) { for (int i = 0 ; i < b ; i ++ ) { res[index++] = 'X'; } res[index++] = '_'; } for (int i = index ; i < res.size() ; i ++ ) res[i] = '_'; return res; }

Compilation message (stderr)

paint.cpp: In function 'std::__cxx11::string solve_puzzle(std::__cxx11::string, std::vector<int>)':
paint.cpp:18:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = index ; i < res.size() ; i ++ )
                            ^
#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...