Submission #365251

# Submission time Handle Problem Language Result Execution time Memory
365251 2021-02-11T10:16:45 Z amunduzbaev CONSUL (info1cup19_consul) C++14
4.96076 / 100
44 ms 364 KB
/** made by amunduzbaev **/
#include "grader.h"
#include <bits/stdc++.h>
#ifndef EVAL
#include "grader.cpp"
#endif
using namespace std;
 
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(),x.rend()
#define NeedForSpeed ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
//#define int long long
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii; 
typedef pair<ll, ll> pll; 
typedef vector<ll> vll;
typedef vector<int> vii;
typedef vector<pll> vpll;
typedef vector<pii> vpii;
template<class T> bool umin(T& a, const T& b) {return a > b? a = b, true:false;}
template<class T> bool umax(T& a, const T& b) {return a < b? a = b, true:false;}

const int NN = 1e3+5;
const int mod = 1e9+7;
const ll inf = 1e18;
const ld Pi = acos(-1);

#define MULTI 1


int n, m, k, ans, res,  used[NN];

void solve(int n){
	srand(time(NULL));
	vii res;
	
	for(int i=0;i<50;i++){
		int in = rand()%n +1;
		if(used[in]) {i--; continue;}
		int val = kth(in);
		int num = cnt(val);
		if(num > n/3){
			say_answer(val);
			return;
		}
	}
	say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 32 ms 364 KB Output is partially correct
2 Correct 6 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 28 ms 364 KB Output is partially correct
2 Partially correct 37 ms 364 KB Output is partially correct
3 Correct 10 ms 364 KB Output is correct
4 Correct 8 ms 364 KB Output is correct
5 Partially correct 25 ms 364 KB Output is partially correct
6 Partially correct 37 ms 364 KB Output is partially correct
7 Partially correct 37 ms 364 KB Output is partially correct
8 Partially correct 44 ms 364 KB Output is partially correct
9 Partially correct 34 ms 364 KB Output is partially correct
10 Partially correct 34 ms 364 KB Output is partially correct
11 Partially correct 25 ms 364 KB Output is partially correct
12 Partially correct 27 ms 364 KB Output is partially correct
13 Partially correct 44 ms 364 KB Output is partially correct
14 Partially correct 22 ms 364 KB Output is partially correct