Submission #1006806

#TimeUsernameProblemLanguageResultExecution timeMemory
1006806GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define fr(m,n,k) for(int m=n;m<=k;m++) int n; string guess_sequence(int N) { string v = "ABXY"; fr(i, 0, 3) { fr(j, 0, 3) { fr(l, 0, 3) { string p = v[i] + v[j] + v[l]; int x = press(p); if (x == 3) { return p; } } } } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:32: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   12 |         string p = v[i] + v[j] + v[l];
combo.cpp:8:14: warning: control reaches end of non-void function [-Wreturn-type]
    8 |   string v = "ABXY";
      |              ^~~~~~