| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 703563 | t6twotwo | 드문 곤충 (IOI22_insects) | C++17 | 349 ms | 248 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int min_cardinality(int n) {
vector<int> p(n);
iota(p.begin(), p.end(), 0);
for (int i = 0; i < n; i++) {
move_inside(i);
for (int j = i + 1; j < n; j++) {
move_inside(j);
if (press_button() == 2) {
p[j] = p[i];
}
move_outside(j);
}
move_outside(i);
}
vector<int> cnt(n);
for (int i = 0; i < n; i++) {
cnt[p[i]]++;
}
int ans = n;
for (int i = 0; i < n; i++) {
if (cnt[i] > 0) {
ans = min(ans, cnt[i]);
}
}
return ans;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
