Submission #1085942

#TimeUsernameProblemLanguageResultExecution timeMemory
1085942kiethm07Combo (IOI18_combo)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <combo.h> #define pii pair<int,int> #define iii pair<int,pii> #define fi first #define se second #define vi vector<int> #define all(x) x.begin(),x.end() #define TEXT "a" using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; const int inf = 1e9 + 7; const ld eps = 1e-8; const double pi = acos(-1); string ch[4] = {"A","B","X","Y"}; string S = "ABX"; string guess_sequence(int n){ string s = ""; int f = -1; int g = press(s + ch[0] + ch[1]); if (g == 0){ g = press(s + ch[2]); if (g == 0) f = 3; else f = 2; } else{ g = press(s + ch[0]); if (g == 0) f = 1; else f = 0; } s += ch[f]; vector<int> a; for (int i = 0; i < 4; i++){ if (i == f) continue; a.push_back(i); } string g1,g2,g3; g1 = g2 = g3 = ""; g1 += ch[a[1]] + ch[a[0]]; g2 += ch[a[1]] + ch[a[1]]; g3 += ch[a[1]] + ch[a[2]]; for (int i = 2; i < n; i++){ int g = press(s + ch[a[0]] + s + g1 + s + g2 + s + g3); if (g == 0) s += ch[a[2]]; if (g == 1) s += ch[a[0]]; if (g == 2) s += ch[a[1]]; } g = press(s + ch[a[0]]); if (g == 0){ g = press(s + ch[a[1]]); if (g == 0) s += ch[a[2]]; else s += ch[a[1]]; } else s += ch[a[0]]; return s; } int main(){ cout << guess_sequence(3); }

Compilation message (stderr)

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