Submission #1178674

#TimeUsernameProblemLanguageResultExecution timeMemory
1178674shirokitoCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define el '\n' int press(string p) { // cout << p << endl; int x; cin >> x; return x; } string guess_sequence(int N) { vector<char> lst_c = { 'A', 'B', 'X', 'Y' }; string cur = ""; for (int i = 1; i <= N; i++) { for (char c: lst_c) { if (press(cur + c) == i) { cur += c; break; } } } return cur; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccMmGpKX.o: in function `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
grader.cpp:(.text+0x0): multiple definition of `press(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'; /tmp/ccUcOHKj.o:combo.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status