답안 #364129

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
364129 2021-02-08T09:28:37 Z ahmedfouadnew CONSUL (info1cup19_consul) C++17
4.0115 / 100
62 ms 492 KB
#include "grader.h"
//#include "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
void solve(int n)
{
   int x;
   map<int,bool>mp;
    int vis[1001]={0};
    int cur=100;
    bool ok=0;
   while(cur--)
   {
       x=rand()%n+1;
       if(vis[x]) continue;
       vis[x]=1;
       int y=kth(x);
       if(!mp[y])
       {
           mp[y]=1;
           if(cnt(y)>n/3)
           {
               ok=1;
               say_answer(y);
               break;
           }
       }
   }
   if(!ok) say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 15 ms 364 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 42 ms 364 KB Output is partially correct
2 Correct 11 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 37 ms 492 KB Output is partially correct
2 Partially correct 59 ms 364 KB Output is partially correct
3 Correct 8 ms 492 KB Output is correct
4 Correct 7 ms 364 KB Output is correct
5 Partially correct 43 ms 364 KB Output is partially correct
6 Partially correct 59 ms 364 KB Output is partially correct
7 Partially correct 51 ms 364 KB Output is partially correct
8 Partially correct 40 ms 364 KB Output is partially correct
9 Partially correct 56 ms 364 KB Output is partially correct
10 Partially correct 49 ms 364 KB Output is partially correct
11 Partially correct 32 ms 364 KB Output is partially correct
12 Partially correct 57 ms 364 KB Output is partially correct
13 Partially correct 62 ms 364 KB Output is partially correct
14 Partially correct 58 ms 364 KB Output is partially correct