제출 #75407

#제출 시각아이디문제언어결과실행 시간메모리
75407khalilmiriCombo (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include <string>
using namespace std;
vector<int> tab;
string guess_sequence(int N)
{   tab.push_back(0);
tab.push_back(1);
tab.push_back('X' - 'A');
tab.push_back('Y'- 'A');
    do{ string g="";
         for(int i=0;i<3;i++)
       {           
            char x= tab[i] + 'A';
            g=g+x;
            
            }
        if(press(g)==3)
        {
            return(g);
        }
        
    }while(next_permutation(tab.begin(),tab.end()));
}

컴파일 시 표준 에러 (stderr) 메시지

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:17:12: error: 'press' was not declared in this scope
   17 |         if(press(g)==3)
      |            ^~~~~
combo.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^