Submission #254516

#TimeUsernameProblemLanguageResultExecution timeMemory
254516ErkhemkhuuCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <combo.h> using namespace std; #define ll long long #define pb push_back #define mk make_pair #define F first #define S second string guess_sequence(int n) { string res = ""; vector <char> vc = {'A', 'B', 'X', 'Y'}; for(auto &i: vc) for(auto &j: vc) for(auto &k: vc) if(press(i + j + k) == 3) res = i + j + k; return res; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:15:32: error: could not convert '((((int)i) + ((int)j)) + ((int)k))' from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   15 |                 if(press(i + j + k) == 3)
      |                          ~~~~~~^~~
      |                                |
      |                                int