# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1005489 | khanhtb | Rarest Insects (IOI22_insects) | C++17 | 235 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "insects.h"
#define ll int
#define ull unsigned long long
#define ld double
#define pb push_back
#define pf push_front
#define vi vector<ll>
#define vii vector<vi>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define all(a) a.begin(), a.end()
#define fi first
#define se second
using namespace std;
const ll mod = 1e9+7;
const ll inf = 1e18;
const ll base = 31;
const ll blocksz = 320;
const ll N = 1e5+8;
int col[N];
int c[N];
int min_cardinality(int n){
int now_col = 1;
for(int i = 0; i < n; i++){
if(!col[i]){
vi clear_col;
clear_col.pb(i);
move_inside(i), col[i] = now_col;
int cnt = 1;
for(int j = i+1; j < n; j++){
if(!col[j]){
move_inside(j);
int rep = press_button();
if(rep > cnt) col[j] = now_col, cnt++, clear_col.pb(j);
else move_outside(j);
}
}
for(int x:clear_col) move_outside(x);
now_col++;
}
}
for(int i = 0; i < n; i++) c[col[i]]++;
int ans = N;
for(int i = 0; i < n; i++){
if(c[col[i]] > 0) ans = min(ans,c[col[i]]);
}
return ans;
}
컴파일 시 표준 에러 (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... |