# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
799849 | n3rm1n | CONSUL (info1cup19_consul) | C++17 | 38 ms | 316 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "grader.h"
#define endl '\n'
using namespace std;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
void solve(int N)
{
map < int, int > checked;
int atleast = N/3 + 1;
vector < int > index;
for (int i = 1; i <= N; ++ i)
index.push_back(i);
random_shuffle(index.begin(), index.end());
for (int i = 0; i < index.size(); ++ i)
{
int x = kth(index[i]);
if(checked[x])continue;
else if(cnt(x) >= atleast)
{
say_answer(x);
return;
}
checked[x] = 1;
}
say_answer(-1);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |