답안 #369463

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
369463 2021-02-21T17:50:09 Z sad CONSUL (info1cup19_consul) C++14
컴파일 오류
0 ms 0 KB
#include "bits/stdc++.h"
#define fi first
#define se second
#define pb push_back
#define ll long long
void solve(int n)
{
    for(int i=1;i<n+1;i++)
    {
        int x=kth(i);
        int y=cnt(x);
        if(y>n/3)return x;
    }return -1;
}

Compilation message

consul.cpp: In function 'void solve(int)':
consul.cpp:10:15: error: 'kth' was not declared in this scope
   10 |         int x=kth(i);
      |               ^~~
consul.cpp:11:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |         int y=cnt(x);
      |               ^~~
      |               int
consul.cpp:12:25: error: return-statement with a value, in function returning 'void' [-fpermissive]
   12 |         if(y>n/3)return x;
      |                         ^
consul.cpp:13:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
   13 |     }return -1;
      |              ^