제출 #92605

#제출 시각아이디문제언어결과실행 시간메모리
92605BadralPaint By Numbers (IOI16_paint)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int a[1000005]; int main() { string str, s; getline(cin, str); int i; for(i = 14; i < (int)str.size(); i++) { if(str[i] != '"') s += str[i]; else break; } i += 2; vector<int> v; for(; i < (int)str.size(); i++) { int k = 0; while(str[i] <= '9' && str[i] >= '0') { k = k * 10 + str[i] - 48; i++; } if(k != 0) v.push_back(k); } int k = v[0]; for(int i = 0; i < k; i++) { a[i]++; } for(int i = (int)s.size(); i >= (int)s.size()-k; i--) { a[i]++; } for(int i = 0; i < (int)s.size(); i++) { if(a[i] == 2) { cout<<'X'; } else cout<<'?'; } }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccaDjV6B.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cca9k5YN.o:paint.cpp:(.text.startup+0x0): first defined here
/tmp/ccaDjV6B.o: In function `main':
grader.cpp:(.text.startup+0x1eb): undefined reference to `solve_puzzle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status