제출 #552280

#제출 시각아이디문제언어결과실행 시간메모리
552280ctphong콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define fto(i,a,b) for(int i = a; i <= b; ++i) string s; int out(string s) { cout << s << endl; fflush(stdout); int gt; cin >> gt; return gt; } int main() { int n; cin >> n; string gt = ""; if (out(s+"X") == 1) s = s + "X"; else if (out(s+"Y") == 1) s = s + "Y"; else if (out(s+"A") == 1) s = s + "A"; else if (out(s+"B") == 1) s = s + "B"; gt = s; fto (i, 2, n) { if (out(s+"X"+gt) == i) s = s + "X"; else if (out(s+"Y"+gt) == i) s = s + "Y"; else if (out(s+"A"+gt) == i) s = s + "A"; else if (out(s+"B"+gt) == i) s = s + "B"; } cout << s << endl; return 0; }

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

/usr/bin/ld: /tmp/ccegOz2e.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cconKYAc.o:combo.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccegOz2e.o: in function `main':
grader.cpp:(.text.startup+0x4c): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status