Submission #1105810

#TimeUsernameProblemLanguageResultExecution timeMemory
1105810magicianCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" #define MASK(i) (1ll << (i)) #define BIT(x, i) (((x) >> (i)) & 1) #define REP(i, a, b) for(int i = (a), _b = (b); i <= _b; ++i) #define REPD(i, a, b) for(int i = (a), _b = (b); i >= _b; --i) #define ALL(v) (v).begin(), (v).end() #define SZ(v) (int)(v).size() #define PATHWA "A" #define fi first #define se second #define ll long long using namespace std; /* int press(string p) { const string S = "ABXYY"; int res = 0; REP(l, 1, SZ(S)) { REP(i, 0, SZ(p) - l) { if(S.substr(0, l) == p.substr(i, l)) { res = l; break; } } } return res; } */ string guess_sequence(int N) { vector<char> a = {'A', 'B', 'X', 'Y'}; string res, tmp; REP(i, 0, 2) { tmp.push_back(a[i]); if(press(tmp) == 1) { res.push_back(a[i]); break; } tmp.pop_back(); } if(res.empty()) { res.push_back(a[3]); tmp.push_back(a[3]); } vector<char> b; REP(i, 0, 3) if(res[0] != a[i]) b.push_back(a[i]); tmp = res; REP(l, 2, N) { REP(i, 0, 1) { tmp.push_back(b[i]); if(press(tmp) == l) { res.push_back(b[i]); break; } tmp.pop_back(); } if(SZ(res) < l) { res.push_back(b[2]); tmp.push_back(b[2]); } } return res; } int main(void) { /* ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen(PATHWA".INP", "r")) { freopen(PATHWA".INP", "r", stdin); freopen(PATHWA".OUT", "w", stdout); }*/ return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccGrcPDG.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc7JriUG.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status