# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
247247 | oolimry | Lokahian Relics (FXCUP4_lokahia) | C++17 | 7 ms | 768 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "lokahia.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
int FindBase(int N){
srand(time(NULL));
vector<int> v;
if(N == 1){
return 0;
}
for(int i = 0;i < N;i++) v.push_back(i);
int cnt = 0;
map<int,int> occur;
int can = 0;
while(cnt < 600){
int a = rand() % N, b = rand() % N;
if(a == b) continue;
cnt++;
int x = CollectRelics(a,b);
if(x == -1) continue;
occur[x]++;
can++;
}
int best = -1;
for(int i = 0;i < N;i++){
//cout << occur[i] << "\n";
if(occur[i] >= 120){
best = i;
}
}
//cout << best << " ";
return best;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |