답안 #478200

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
478200 2021-10-06T12:42:25 Z omohamadooo CONSUL (info1cup19_consul) C++14
85 / 100
40 ms 420 KB
/*
      ___           ___           ___           ___           ___           ___           ___          _____          ___           ___           ___
     /  /\         /__/\         /  /\         /__/\         /  /\         /__/\         /  /\        /  /::\        /  /\         /  /\         /  /\
    /  /::\       |  |::\       /  /::\        \  \:\       /  /::\       |  |::\       /  /::\      /  /:/\:\      /  /::\       /  /::\       /  /::\
   /  /:/\:\      |  |:|:\     /  /:/\:\        \__\:\     /  /:/\:\      |  |:|:\     /  /:/\:\    /  /:/  \:\    /  /:/\:\     /  /:/\:\     /  /:/\:\
  /  /:/  \:\   __|__|:|\:\   /  /:/  \:\   ___ /  /::\   /  /:/~/::\   __|__|:|\:\   /  /:/~/::\  /__/:/ \__\:|  /  /:/  \:\   /  /:/  \:\   /  /:/  \:\
 /__/:/ \__\:\ /__/::::| \:\ /__/:/ \__\:\ /__/\  /:/\:\ /__/:/ /:/\:\ /__/::::| \:\ /__/:/ /:/\:\ \  \:\ /  /:/ /__/:/ \__\:\ /__/:/ \__\:\ /__/:/ \__\:\
 \  \:\ /  /:/ \  \:\~~\__\/ \  \:\ /  /:/ \  \:\/:/__\/ \  \:\/:/__\/ \  \:\~~\__\/ \  \:\/:/__\/  \  \:\  /:/  \  \:\ /  /:/ \  \:\ /  /:/ \  \:\ /  /:/
  \  \:\  /:/   \  \:\        \  \:\  /:/   \  \::/       \  \::/       \  \:\        \  \::/        \  \:\/:/    \  \:\  /:/   \  \:\  /:/   \  \:\  /:/
   \  \:\/:/     \  \:\        \  \:\/:/     \  \:\        \  \:\        \  \:\        \  \:\         \  \::/      \  \:\/:/     \  \:\/:/     \  \:\/:/
    \  \::/       \  \:\        \  \::/       \  \:\        \  \:\        \  \:\        \  \:\         \__\/        \  \::/       \  \::/       \  \::/
     \__\/         \__\/         \__\/         \__\/         \__\/         \__\/         \__\/                       \__\/         \__\/         \__\/

*/

#include <bits/stdc++.h>
#include "grader.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define pb push_back
#define endl '\n'
#define pii pair<ll,ll >
#define F first
#define S second
#define ld long double

using namespace std;
using namespace __gnu_pbds;

typedef tree<ll , null_type , less<ll> ,rb_tree_tag ,tree_order_statistics_node_update >ordered_set;

const int MOD=998244353;
const int  N=8e5+7;
const ll INF= 1e18+10;

long long po(ll x,ll y)
{
    ll ans=1;
    while(y){
        if(y & 1) ans=(ans*x)%MOD;
        y/=2;
        x=(x*x)%MOD;
    }
    return ans;
}

map<ll,bool >pos;
map<ll,bool >num;

void solve(int n)
{
    ll q=0;
    while(q<60){
        int i=(rand()%n)+1;
        while(pos[i]) i=(rand()%n)+1;
        ll val=kth(i);
        q++;
        if(q<60){
            q++;
            if(cnt(val)>n/3){
                say_answer(val);
                return;
            }
        }
    }
    say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 292 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Correct 19 ms 200 KB Output is correct
2 Correct 9 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 292 KB Output is correct
2 Correct 25 ms 200 KB Output is correct
3 Correct 8 ms 280 KB Output is correct
4 Correct 6 ms 200 KB Output is correct
5 Correct 21 ms 292 KB Output is correct
6 Correct 27 ms 200 KB Output is correct
7 Correct 30 ms 292 KB Output is correct
8 Correct 40 ms 296 KB Output is correct
9 Correct 27 ms 296 KB Output is correct
10 Correct 34 ms 296 KB Output is correct
11 Correct 31 ms 200 KB Output is correct
12 Correct 19 ms 292 KB Output is correct
13 Correct 24 ms 304 KB Output is correct
14 Correct 27 ms 420 KB Output is correct