| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1027540 | PatrikPrit | Rarest Insects (IOI22_insects) | C++17 | 278 ms | 436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
typedef long long ll;
int min_cardinality(int N) {
vector<int> group(N);
iota(all(group),0);
for (int a=0;a<N;a++){
if (group[a]==a){
move_inside(a);
for (int b=a+1;b<N;b++){
if (group[b]==b){
move_inside(b);
int card = press_button();
if (card==2){
group[b]=group[a];
}
move_outside(b);
}
}
move_outside(a);
}
}
vector<int> group_f(N,0);
for (int e:group){
group_f[e]++;
}
int ans=N;
for (int f:group_f){
if (f>0){
ans=min(ans,f);
}
}
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... | ||||
