제출 #1151841

#제출 시각아이디문제언어결과실행 시간메모리
1151841arsen23CONSUL (info1cup19_consul)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" #define all(v) v.begin(), v.end() #define pb push_back #define F first #define S second #define in insert using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 1e5 + 123; const int P = 320; const int mod = 1e9 + 7; int n, m, k; int a[N]; int b[N]; int cnt = 0; bool used[N]; bool usedd[N]; void solve(int n) { cin >> n; vector <int> v; for(int i = 1; i <= n; i++) { v.pb(i) } random_shuffle(all(v)); for(int i = 0; i < (n / 2, 30); i++) { int cur = kth(v[i]); if(cnt(cur) > n / 3) { say_answer(cur); return; } } say_answer(-1); } // 28 37 48 49 55 56 57 58 67 9 // 9 + 1 +

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

consul.cpp:26:5: error: 'int cnt' redeclared as different kind of entity
   26 | int cnt = 0;
      |     ^~~
In file included from consul.cpp:2:
grader.h:8:5: note: previous declaration 'int cnt(int)'
    8 | int cnt(int k);
      |     ^~~
consul.cpp: In function 'void solve(int)':
consul.cpp:38:24: error: expected ';' before '}' token
   38 |                 v.pb(i)
      |                        ^
      |                        ;
   39 |         }
      |         ~