제출 #988418

#제출 시각아이디문제언어결과실행 시간메모리
988418cnn008드문 곤충 (IOI22_insects)C++17
10 / 100
98 ms600 KiB
#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],type;
int min_cardinality(int n){
	for(int i=0; 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_button();
				if(val==2) vis[j]=type;
				move_outside(j);
			}
			move_outside(i);
		}
	}
	map <int,int> mp;
	for(int i=0; i<n; i++) mp[vis[i]]++;
	int ans=INT_MAX;
	for(auto [x,y]:mp) ans=min(ans,y);
	return ans;
}
/**  /\_/\
*   (= ._.)
*   / >💖 \>💕
**/

컴파일 시 표준 에러 (stderr) 메시지

insects.cpp:4:21: warning: extra tokens at end of #include directive
    4 | #include "insects.h";
      |                     ^
insects.cpp:37:9: warning: "/*" within comment [-Wcomment]
   37 | /**  /\_/\
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...