제출 #464380

#제출 시각아이디문제언어결과실행 시간메모리
464380fuad27Password (RMI18_password)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; string guess(int n, int s) { string ans = ""; for(int i = 0;i<s;i++) { ans+=char(i+'a'); } do { if(query(ans.substr(0, n)) == n)return ans.substr(0, n); }while(next_permutation(ans.begin(), ans.end())); return ""; }

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

password.cpp: In function 'std::string guess(int, int)':
password.cpp:9:6: error: 'query' was not declared in this scope
    9 |   if(query(ans.substr(0, n)) == n)return ans.substr(0, n);
      |      ^~~~~