제출 #254516

#제출 시각아이디문제언어결과실행 시간메모리
254516Erkhemkhuu콤보 (IOI18_combo)C++17
컴파일 에러
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;
}

컴파일 시 표준 에러 (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