# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1025129 | mansur | 드문 곤충 (IOI22_insects) | C++17 | 44 ms | 1104 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
#define rall(s) s.rbegin(), s.rend()
#define all(s) s.begin(), s.end()
#define sz(s) (int) s.size()
#define s second
#define f first
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(131415889);
int min_cardinality(int n) {
vector<int> p(n), pos;
for (int i = 0; i < n; i++) p[i] = i;
shuffle(all(p), rng);
int k = 0;
for (int i = 0; i < sz(p); i++) {
move_inside(p[i]);
if (press_button() == 1) {
k++;
pos.push_back(p[i]);
}else move_outside(p[i]);
}
for (int x: pos) move_outside(x);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |