답안 #1070004

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1070004 2024-08-22T10:57:39 Z Unforgettablepl 드문 곤충 (IOI22_insects) C++17
0 / 100
1 ms 344 KB
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;

int min_cardinality(int N){
    vector<pair<int,int>> current;
    vector<vector<int>> types;
    for(int i=0;i<N;i++) {
        move_inside(i);
        if(press_button()==1) {
            current.emplace_back(i,types.size());
            types.emplace_back();
            types.back().emplace_back(i);
            continue;
        }
        for(auto&[x,y]:current) {
            move_outside(x);
            if(press_button()==1) {
                types[y].emplace_back(i);
            }
            move_inside(x);
        }
    }
    int siz = N;
    for(auto&i:types)siz=min(siz,(int)i.size());
    return siz;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Incorrect 0 ms 344 KB Wrong answer.
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Incorrect 0 ms 344 KB Wrong answer.
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Incorrect 0 ms 344 KB Wrong answer.
6 Halted 0 ms 0 KB -