Submission #988415

# Submission time Handle Problem Language Result Execution time Memory
988415 2024-05-24T16:17:38 Z cnn008 Rarest Insects (IOI22_insects) C++17
Compilation error
0 ms 0 KB
#include "bits/stdc++.h"
using namespace std;

#include "insects.h";

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

#define ll long long

const int N=1e5+5;
const int mod=1e9+7;
int vis[205],cnt[205],type;
int min_cardinality(int n){
	for(int i=1; i<=n; i++){
		if(!vis[i]){
			vis[i]=++type;
			move_inside(i);
			for(int j=i+1; j<=n; j++){
				move_inside(j);
				int val=press_buton();
				if(val==2) vis[j]=type;
				move_outside(j);
			}
			move_outside(i);
		}
	}
	for(int i=1; i<=n; i++) cnt[vis[i]]++;
	return *min_element(cnt+1,cnt+n+1);
}
/**  /\_/\
*   (= ._.)
*   / >💖 \>💕
**/

Compilation message

insects.cpp:4:21: warning: extra tokens at end of #include directive
    4 | #include "insects.h";
      |                     ^
insects.cpp:34:9: warning: "/*" within comment [-Wcomment]
   34 | /**  /\_/\
      |          
insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:24:13: error: 'press_buton' was not declared in this scope; did you mean 'press_button'?
   24 |     int val=press_buton();
      |             ^~~~~~~~~~~
      |             press_button