답안 #478201

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
478201 2021-10-06T12:43:40 Z omohamadooo CONSUL (info1cup19_consul) C++14
100 / 100
33 ms 444 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<50){
        int i=(rand()%n)+1;
        while(pos[i]) i=(rand()%n)+1;
        ll val=kth(i);
        q++;
        if(q<50){
            q++;
            if(cnt(val)>n/3){
                say_answer(val);
                return;
            }
        }
    }
    say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 200 KB Output is correct
2 Correct 9 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 304 KB Output is correct
2 Correct 20 ms 300 KB Output is correct
3 Correct 7 ms 200 KB Output is correct
4 Correct 9 ms 292 KB Output is correct
5 Correct 25 ms 292 KB Output is correct
6 Correct 23 ms 312 KB Output is correct
7 Correct 25 ms 296 KB Output is correct
8 Correct 15 ms 320 KB Output is correct
9 Correct 27 ms 296 KB Output is correct
10 Correct 32 ms 200 KB Output is correct
11 Correct 25 ms 304 KB Output is correct
12 Correct 24 ms 200 KB Output is correct
13 Correct 33 ms 444 KB Output is correct
14 Correct 24 ms 200 KB Output is correct