| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1210017 | PlayVoltz | CONSUL (info1cup19_consul) | C++20 | 14 ms | 408 KiB |
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int n){
int loop=30, ans=-1;
if (n==50){
std::map<int, int> freq;
for(int i=1;i<=n;i++) freq[kth(i)]++;
for(auto &e:freq) {
if(e.second > n/3) {
say_answer(e.first);
return ;
}
}
say_answer(-1);
return ;
}
while (loop--){
int temp=kth(rand()%n+1);
if (cnt(temp)>n/3)ans=temp;
}
say_answer(ans);
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
