제출 #369465

#제출 시각아이디문제언어결과실행 시간메모리
369465sadCONSUL (info1cup19_consul)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #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; }

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

consul.cpp: In function 'void solve(int)':
consul.cpp:13:25: error: return-statement with a value, in function returning 'void' [-fpermissive]
   13 |         if(y>n/3)return x;
      |                         ^
consul.cpp:14:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
   14 |     }return -1;
      |              ^