Submission #149232

# Submission time Handle Problem Language Result Execution time Memory
149232 2019-09-01T06:01:17 Z Ian and 2-bit memory(#3648, percywtc, nhho, ulna) Lokahian Relics (FXCUP4_lokahia) C++17
0 / 100
7 ms 720 KB
#include <bits/stdc++.h>

using namespace std;


#include "lokahia.h"
int tmp;

int FindBase(int N){
if (N == 1)
	return 0;
srand(123);
	int left = 300 - (N - 1);
	map<int, int> m;
	while (left) {
		int ta = rand() % N;
		int tb = rand() % N;
		if (ta == tb) continue;
		printf("%d  %d %d\n", ++tmp, ta, tb);
		int tc = CollectRelics(ta, tb);
		if (tc != -1)
		m[tc]++;
		left--;
	}
	int ans = -1, ma = -1;
	//for (auto& i : m) printf("%d %d\n", i.first, i.second);
	for (auto& i : m)
		if (i.second >= ma) {
			ans = i.first;
			ma = i.second;
		}
	// printf("%d %d\n", ans, ma);
	if (ans == -1)
		return ans;
	ma = 1;
	for (int i = 0; i < N; i++)
		if (i != ans)
			ma += CollectRelics(i, ans) <= ans;
	if (ma > N / 2)
	return ans;
	return -1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 640 KB Wrong
2 Incorrect 6 ms 692 KB Wrong
3 Incorrect 7 ms 648 KB Wrong
4 Incorrect 6 ms 720 KB Wrong
5 Incorrect 7 ms 640 KB Wrong
6 Incorrect 6 ms 640 KB Wrong
7 Incorrect 6 ms 640 KB Wrong
8 Incorrect 7 ms 600 KB Wrong
9 Incorrect 6 ms 640 KB Wrong
10 Incorrect 7 ms 640 KB Wrong
11 Incorrect 7 ms 640 KB Wrong
12 Incorrect 6 ms 640 KB Wrong
13 Incorrect 6 ms 600 KB Wrong
14 Correct 6 ms 512 KB Correct : C = 0
15 Incorrect 7 ms 600 KB Wrong
16 Incorrect 7 ms 512 KB Wrong
17 Incorrect 7 ms 640 KB Wrong
18 Incorrect 6 ms 512 KB Wrong
19 Incorrect 6 ms 512 KB Wrong
20 Incorrect 6 ms 600 KB Wrong
21 Incorrect 7 ms 640 KB Wrong
22 Incorrect 6 ms 640 KB Wrong
23 Incorrect 7 ms 640 KB Wrong
24 Incorrect 7 ms 616 KB Wrong
25 Incorrect 7 ms 640 KB Wrong
26 Incorrect 7 ms 720 KB Wrong
27 Incorrect 6 ms 640 KB Wrong