Submission #713577

#TimeUsernameProblemLanguageResultExecution timeMemory
713577DennisTranCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#pragma GCC optimize("O2") #pragma GCC target("avx,avx2,fma") #include "combo.h" #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FOD(i, a, b) for (int i = (a); i >= (b); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define ALL(x) (x).begin(), (x).end() #define TIME (1.0 * clock() / CLOCKS_PER_SEC) #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); } using namespace std; const int MAXN = 2e5 + 5; int press(string s) { cout << s << endl; int x; cin >> x; return x; } string guess_sequence(int N) { string t = ""; FOR(i, 1, N) { for (char x : {'A', 'B', 'X', 'Y'}) { t += x; if (press(t) == i) break; t.pop_back(); } } return t; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccalhOVx.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/cc7NKEyx.o:combo.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status