Submission #727254

#TimeUsernameProblemLanguageResultExecution timeMemory
727254nasir_bashirovRarest Insects (IOI22_insects)C++17
Compilation error
0 ms0 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, 0);
    for(int i = 0; i < n; i++){
        move_inside(i);
        for(int j = i + 1; j < n; j++){
            move_inside(j);
            int mx = press_buton();
            if(mx > 1){
                cnt[i]++;
            }
            move_outside(j);
        }
        move_outside(i);
    }
    int res = 1e9;
    for(int i : cnt){
        res = min(res, i);
    }
    return res;
}

Compilation message (stderr)

insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:25:22: error: 'press_buton' was not declared in this scope; did you mean 'press_button'?
   25 |             int mx = press_buton();
      |                      ^~~~~~~~~~~
      |                      press_button