제출 #164324

#제출 시각아이디문제언어결과실행 시간메모리
164324aggu_01000101콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <queue> #include <fstream> #include <set> #include <iomanip> #include <unordered_map> #define INF 1e16 #define int long long #define N (int)1e5 + 5 using namespace std; string guess_sequence(int n){ char lol[] = {'A', 'B', 'X', 'Y'}; int taken = 0; while(press("" + lol[taken])==0) taken++; string s = "" + lol[taken]; for(int i = 1;i<n;i++){ for(int j = 0;j<4;j++){ if(j==taken) continue; int rn = press(s + lol[j]); if(rn==(i+1)){ s = s+lol[j]; j = 5; } } } return s; }

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

combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:18:11: error: 'press' was not declared in this scope
   18 |     while(press("" + lol[taken])==0) taken++;
      |           ^~~~~
combo.cpp:23:22: error: 'press' was not declared in this scope
   23 |             int rn = press(s + lol[j]);
      |                      ^~~~~