| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 813581 | Edu175 | 드문 곤충 (IOI22_insects) | C++17 | 321 ms | 208 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "insects.h"
#include <bits/stdc++.h>
#define pb push_back
#define fst first
#define snd second
#define fore(i,a,b) for(ll i=a,ioi=b;i<ioi;i++)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(),x.end()
#define mset(a,v) memset((a),(v),sizeof(a))
#define imp(v) for(auto djfhg:v)cout<<djfhg<<" ";cout<<"\n"
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
//const ll MAXN=205;
void in(ll i){
move_inside(i);
}
void out(ll i){
move_outside(i);
}
ll ask(){
return press_button();
}
int min_cardinality(int N){
ll n=N;
vector<ll>a;
fore(i,0,n)a.pb(i),in(i);
vector<ll>ban(n);
ll mx;
while(SZ(a)){
mx=ask();
fore(i,0,SZ(a)){
out(a[i]);
if(ask()<mx)ban[a[i]]=1;
in(a[i]);
}
vector<ll>ai;
for(auto i:a){
if(!ban[i])ai.pb(i);
else out(i);
}
a=ai;
}
return mx;
}컴파일 시 표준 에러 (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... | ||||
