Submission #962037

# Submission time Handle Problem Language Result Execution time Memory
962037 2024-04-13T05:33:44 Z cnn008 Rarest Insects (IOI22_insects) C++17
Compilation error
0 ms 0 KB
#include "bits/stdc++.h"
using namespace std;

#ifdef N_N_C
#include "debug.h"
#else
#define cebug(...) "Arya"
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
int rand(int l, int r){
    assert(l<=r);
    return uniform_int_distribution<int> (l,r)(rng);
}

int min_cardinality(int n){
	int type=0;
	for(int i=0; i<n; i++){
		move_inside(i);
		press_buton();
		if(press_buton()==1){
			type++;
			move_outside(i);
		}
	}
	return rand(1,n/type);
}

Compilation message

insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:19:3: error: 'move_inside' was not declared in this scope
   19 |   move_inside(i);
      |   ^~~~~~~~~~~
insects.cpp:20:3: error: 'press_buton' was not declared in this scope
   20 |   press_buton();
      |   ^~~~~~~~~~~
insects.cpp:23:4: error: 'move_outside' was not declared in this scope
   23 |    move_outside(i);
      |    ^~~~~~~~~~~~