제출 #1354005

#제출 시각아이디문제언어결과실행 시간메모리
1354005lizi14CONSUL (info1cup19_consul)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
//#include "grader.h"
const int N=1e9;
void solve(int n){
    srand(time(0));
    int hi=0;
    for(int i=0; i<50; i++){
        int bati=rand()%n;
        int ixvi=kth(bati);
        int batuka=cnt(ixvi+1);
        if(batuka>n/3){
            hi=1;
            say_answer(batuka);
            break;
        }
        
    }
    if(hi==0){
        say_answer(-1);
    }
    
}

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

consul.cpp: In function 'void solve(int)':
consul.cpp:10:18: error: 'kth' was not declared in this scope
   10 |         int ixvi=kth(bati);
      |                  ^~~
consul.cpp:11:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |         int batuka=cnt(ixvi+1);
      |                    ^~~
      |                    int
consul.cpp:14:13: error: 'say_answer' was not declared in this scope
   14 |             say_answer(batuka);
      |             ^~~~~~~~~~
consul.cpp:20:9: error: 'say_answer' was not declared in this scope
   20 |         say_answer(-1);
      |         ^~~~~~~~~~