제출 #64702

#제출 시각아이디문제언어결과실행 시간메모리
64702bazsi700Question (Grader is different from the original contest) (CEOI14_question_grader)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long string tobase(int a, int base) { string str = ""; while(a > 0) { cout << a << " " << str << endl; char ch = a%base; str+= ch+'0'; a/=base; } reverse(str.begin(),str.end()); return str; } int main() { ios::sync_with_stdio(false); cin.tie(0); int ty; cin >> ty; int T,n; cin >> T >> n; if(ty == 1) { while(T--) { int x,y; cin >> x >> y; string sx = tobase(x,3); string sy = tobase(y,3); while(sx.length() < 6) { sx = '0'+sx; } while(sy.length() < 6) { sy = '0'+sy; } for(int i = 0; i < 6; i++) { if(sx.at(i) != sy.at(i)) { cout << (3*i)+sx.at(i)-'0' << "\n"; break; } } } } else { while(T--) { int q,h; cin >> q >> h; string sx = tobase(q,3); while(sx.length() < 6) { sx = '0'+sx; } if(sx.at(h/3)-'0' ==h%3) { cout << "yes\n"; } else { cout << "no\n"; } } } return 0; }

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

/tmp/cc64XLcg.o: In function `main':
grader_encode.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccSq2SGt.o:encoder.cpp:(.text.startup+0x0): first defined here
/tmp/cc64XLcg.o: In function `main':
grader_encode.c:(.text.startup+0x10a): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status

/tmp/cctZGLsx.o: In function `main':
grader_decode.c:(.text.startup+0x19f): undefined reference to `decode(int, int, int)'
collect2: error: ld returned 1 exit status