제출 #369477

#제출 시각아이디문제언어결과실행 시간메모리
369477sadCONSUL (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
using namespace std;
map<int,int>m;
void solve(int n)
{
    for(int i=1;i<=min(25,n);i++)
    {
        int w=rand();
        w%=n;w++;
        int x=kth(i);
        if(m[x])continue;
        int y=cnt(x);
        if(y>n/3)
        {
            say_answer(x);return;
        }
        vis[x]=1;
    }
    say_answer(-1);
}

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

consul.cpp: In function 'void solve(int)':
consul.cpp:22:9: error: 'vis' was not declared in this scope
   22 |         vis[x]=1;
      |         ^~~