제출 #825361

#제출 시각아이디문제언어결과실행 시간메모리
825361Darren0724CONSUL (info1cup19_consul)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
/*int kth(int p){
    cout<<"kth "<<p<<endl;
    int ans;cin>>ans;return ans;
}
int cnt(int p){
    cout<<"cnt "<<p<<endl;
    int ans;cin>>ans;return ans;
}*/
void say_answer(int k){}
void solve(int n){
    int times=0;
    while(times<25){
        int p=rnd()%n+1;
        int t=kth(p);
        if(cnt(t)>n/3){
            say_answer(t);
            return;
        }
    }
    say_answer(-1);
}

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

consul.cpp: In function 'void solve(int)':
consul.cpp:17:15: error: 'kth' was not declared in this scope
   17 |         int t=kth(p);
      |               ^~~
consul.cpp:18:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |         if(cnt(t)>n/3){
      |            ^~~
      |            int