답안 #149361

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149361 2019-09-01T06:19:40 Z 서울대학교 연구공원 944동 삼성전자서울대연구소(#3600, ho94949, dotorya, zigui) 로카히아 유적 (FXCUP4_lokahia) C++17
0 / 100
8 ms 768 KB
#include "lokahia.h"

#include<bits/stdc++.h>
using namespace std;

mt19937_64 rng(94949);
int R(int a, int b)
{
	return uniform_int_distribution<int>(a, b)(rng);
}

int FindBase(int N){
	if(N==1) return 0;
	vector<int> cnt(N);
	for(int i=0; i<600-N+1; ++i)
	{
		int v1, v2;
		do
		{
			v1 = R(0, N-1);
			v2 = R(0, N-1);
		} while (v1==v2);
		int x = CollectRelics(v1, v2);
		if(x != -1) cnt[x] ++;
	}

	int maxi = max_element(cnt.begin(), cnt.end()) - cnt.begin();
	int cc = 1;
	for(int i=0; i<N; ++i)
		if(i != maxi && -1 != CollectRelics(maxi, i))
			++cc;
	if(cc > N/2) return maxi;
	else return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 6 ms 512 KB Partially correct : C = 600
2 Partially correct 6 ms 640 KB Partially correct : C = 600
3 Partially correct 6 ms 600 KB Partially correct : C = 600
4 Incorrect 7 ms 640 KB Wrong
5 Partially correct 6 ms 640 KB Partially correct : C = 600
6 Partially correct 6 ms 640 KB Partially correct : C = 600
7 Partially correct 7 ms 768 KB Partially correct : C = 600
8 Partially correct 7 ms 640 KB Partially correct : C = 600
9 Partially correct 6 ms 640 KB Partially correct : C = 600
10 Partially correct 6 ms 640 KB Partially correct : C = 600
11 Partially correct 6 ms 640 KB Partially correct : C = 600
12 Partially correct 6 ms 640 KB Partially correct : C = 600
13 Partially correct 7 ms 512 KB Partially correct : C = 600
14 Partially correct 6 ms 640 KB Partially correct : C = 600
15 Partially correct 6 ms 688 KB Partially correct : C = 600
16 Partially correct 6 ms 600 KB Partially correct : C = 600
17 Partially correct 5 ms 640 KB Partially correct : C = 600
18 Partially correct 6 ms 640 KB Partially correct : C = 600
19 Partially correct 8 ms 640 KB Partially correct : C = 600
20 Partially correct 7 ms 512 KB Partially correct : C = 600
21 Partially correct 6 ms 512 KB Partially correct : C = 600
22 Correct 6 ms 472 KB Correct : C = 0
23 Partially correct 7 ms 600 KB Partially correct : C = 600
24 Partially correct 7 ms 600 KB Partially correct : C = 600
25 Partially correct 6 ms 640 KB Partially correct : C = 600
26 Partially correct 6 ms 600 KB Partially correct : C = 600
27 Partially correct 6 ms 512 KB Partially correct : C = 600