Submission #1284318

#TimeUsernameProblemLanguageResultExecution timeMemory
1284318noobsolver24Combo (IOI18_combo)C++20
Compilation error
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;
      }
    }
  }
}

Compilation message (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