# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
988415 | cnn008 | 드문 곤충 (IOI22_insects) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
using namespace std;
#include "insects.h";
#ifdef N_N_C
#include "debug.h"
#else
#define cebug(...) "Arya"
#endif
#define ll long long
const int N=1e5+5;
const int mod=1e9+7;
int vis[205],cnt[205],type;
int min_cardinality(int n){
for(int i=1; i<=n; i++){
if(!vis[i]){
vis[i]=++type;
move_inside(i);
for(int j=i+1; j<=n; j++){
move_inside(j);
int val=press_buton();
if(val==2) vis[j]=type;
move_outside(j);
}
move_outside(i);
}
}
for(int i=1; i<=n; i++) cnt[vis[i]]++;
return *min_element(cnt+1,cnt+n+1);
}
/** /\_/\
* (= ._.)
* / >💖 \>💕
**/