제출 #1284318

#제출 시각아이디문제언어결과실행 시간메모리
1284318noobsolver24Combo (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define int long long #define debug(x) cerr << #x << " = " << (x) << ' '; #define endl '\n' const int sz = 2e5 + 5; const int inf = 1e18; const int mod = 1e9 + 7; string guess_sequence(int n) { vector<char> v = {'A', 'B', 'X', 'Y'}; string res = ""; for (int i = 0; i < n; i++) { for (int i = 0; i < 4; i++) { string t = res + v[i]; int x = press(t); if (x) { res = t; break; } } } }

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

combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^
/usr/bin/ld: /tmp/ccx8l5ok.o: in function `main':
grader.cpp:(.text.startup+0x4b): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status