Submission #727260

#TimeUsernameProblemLanguageResultExecution timeMemory
727260nasir_bashirovRarest Insects (IOI22_insects)C++17
10 / 100
380 ms208 KiB
#include <bits/stdc++.h>
#include "insects.h"
using namespace std;

#define endl '\n'
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define all(x) x.begin(), x.end()
#define fastio\
    ios_base::sync_with_stdio(0);\
    cin.tie(0);\
    cout.tie(0)\

int min_cardinality(int n){
    vi cnt(n, 1);
    for(int i = 0; i < n; i++){
        move_inside(i);
        for(int j = 0; j < n; j++){
            if(i == j)   continue;
            move_inside(j);
            int mx = press_button();
            if(mx > 1){
                cnt[i]++;
            }
            move_outside(j);
        }
        move_outside(i);
    }
    int res = 1e9;
    for(int i : cnt){
        res = min(res, i);
    }
    return res;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...