제출 #623106

#제출 시각아이디문제언어결과실행 시간메모리
623106l_reho콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { // guess del primo carattere string guess = "A"; vector<string> voc{"A", "B", "X", "Y"}; for(int i = 0; i < 4; i++){ int ret = press(voc[i]); if(ret == 1){ guess = voc[i]; break; } } for(int i = 1; i < N; i++){ for(int j = 0; j < 4; j++){ if(voc[j][0] == guess[0]) continue; int ret = press(guess + voc[j]); if(ret == (int)guess.length()+1){ guess += voc[j]; break; } } } return guess; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:13: error: 'press' was not declared in this scope
   11 |   int ret = press(voc[i]);
      |             ^~~~~
combo.cpp:22:14: error: 'press' was not declared in this scope
   22 |    int ret = press(guess + voc[j]);
      |              ^~~~~