제출 #92608

#제출 시각아이디문제언어결과실행 시간메모리
92608BadralPaint By Numbers (IOI16_paint)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int a[1000005]; string solve_puzzle(string s, int[] c) { int k = c; 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; }

컴파일 시 표준 에러 (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;
             ^