Submission #762564

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7625642023-06-21 13:48:04goodbyehanbyeolLokahian Relics (FXCUP4_lokahia)C++17
51 / 100
2 ms596 KiB
#include "lokahia.h"
#include <bits/stdc++.h>
using namespace std;
int FindBase(int n){
if(n == 1) return 0;
mt19937 gen(time(NULL));
uniform_int_distribution<int> uid(0, n - 1);
vector<int> cnt(n);
int rep = 301;
for(int i = 0; i < rep; ++i){
int x = uid(gen), y = uid(gen);
while(x == y){
y = uid(gen);
}
int rv = CollectRelics(x, y);
if(rv != -1){
++cnt[rv];
}
}
int mx = 0, pos = -1;
for(int i = 0; i < n; ++i){
if(cnt[i] > mx){
mx = cnt[i];
pos = i;
}
}
if(pos == -1) return -1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...