Submission #1077397

# Submission time Handle Problem Language Result Execution time Memory
1077397 2024-08-27T06:48:08 Z Muhammad_Aneeq Rarest Insects (IOI22_insects) C++17
0 / 100
0 ms 344 KB
void move_inside(int i);
void move_outside(int i);
int press_button();
#include <iostream>
using namespace std;
int min_cardinality(int N)
{
	bool vis[N]={};
	int ans=N;
	for (int i=0;i<N;i++)
	{
		if (vis[i])
			continue;
		vis[i]=1;
		move_inside(i);
		int cnt=1;
		for (int j=i+1;j<N&&cnt<ans;j++)
		{
			if (vis[j])
				continue;
			cnt++;
			move_inside(j);
			move_outside(j);
			cnt--;
		}
		ans=min(cnt,ans);
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Wrong answer.
3 Halted 0 ms 0 KB -