| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1349596 | sash01 | CONSUL (info1cup19_consul) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve(int n)
{
int br=0,l=0,r;
map <int,int> used,u;
while(1)
{
if(br>n/3)break;
if(br==n)break;
int ans=rand()%n+1;
if(u[ans])continue;
u[ans]=1;
ans=kth(ans);
if(used[ans])continue;
r=cnt(ans);
used[ans]=1;
br+=r;
if(r>(double)n/3)
{
say_answer(ans);
l=1;
break;
}
}
if(l==0)
say_answer(-1);
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
