# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
780893 | Andrey | CONSUL (info1cup19_consul) | C++14 | 25 ms | 296 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int n)
{
srand(time(NULL));
vector<int> bruh(0);
for(int i = 0; i < n; i++) {
bruh.push_back(i+1);
}
int q,a,br,b;
if(n <= 50) {
q = 25;
}
else {
q = 30;
}
for(int i = 0; i < min(n,q); i++) {
a = rand()%(n-i);
b = kth(bruh[a]);
br = cnt(b);
if(br > n/3) {
say_answer(b);
return;
}
else {
for(int j = a; j < bruh.size()-1; j++) {
swap(bruh[j],bruh[j+1]);
}
bruh.pop_back();
}
}
say_answer(-1);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |