Submission #92607

#TimeUsernameProblemLanguageResultExecution timeMemory
92607BadralPaint By Numbers (IOI16_paint)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int a[1000005]; string solve_puzzle(string s, int[] c) { int k = c[0]; for(int i = 0; i < k; i++) a[i]++; for(int i = (int)s.size(); i >= (int)s.size()-k; i--) a[i]++; string sss; for(int i = 0; i < (int)s.size(); i++) { if(a[i] == 2) sss += 'X'; else sss += '?'; } return sss; }

Compilation message (stderr)

paint.cpp:6:37: error: expected ',' or '...' before 'c'
 string solve_puzzle(string s, int[] c) {
                                     ^
paint.cpp: In function 'std::__cxx11::string solve_puzzle(std::__cxx11::string, int*)':
paint.cpp:7:13: error: 'c' was not declared in this scope
     int k = c[0];
             ^