답안 #341977

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
341977 2020-12-31T21:16:57 Z cheissmart CONSUL (info1cup19_consul) C++14
0 / 100
1 ms 364 KB
#include "grader.h"
#ifdef CHEISSMART
#include "grader.cpp"
#endif
#include <bits/stdc++.h>

using namespace std;

void solve(int n) {
	set<int> asked;
	int qry = 0;
	auto is = [&] (int i) {
		int x = kth(i);
		qry++;
		if(asked.count(x)) return -1;
		asked.insert(x);
		qry++;
		if(cnt(x) * 3 > n) return x;
		else return -1;
	};
	mt19937 rng(time(0));
	while(qry + 2 <= 60) {
		int pos = rng() % n + 1;
		int r = is(pos);
		if(r != -1) say_answer(r);
	}
 	say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Multiple answers provided for the same testcase!
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Multiple answers provided for the same testcase!
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Multiple answers provided for the same testcase!
2 Halted 0 ms 0 KB -