제출 #457254

#제출 시각아이디문제언어결과실행 시간메모리
457254ak2006CONSUL (info1cup19_consul)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
const ll mod = 1e9 + 7,inf = 1e18;
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
void solve(int n)
{
    for (int i = 1;i<=min(n,60);i++){
        int I = (rand()%n) + 1;
        int val = cnt(I);
        if (val > n/3){say_answer(I);return;}
    }
    return 0;
}

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

consul.cpp: In function 'void solve(int)':
consul.cpp:24:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   24 |     return 0;
      |            ^