답안 #1008579

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1008579 2024-06-26T14:38:44 Z Unlucky 드문 곤충 (IOI22_insects) C++17
10 / 100
268 ms 344 KB
#include "insects.h"
#include <bits/stdc++.h>
using namespace std;

bool inside[1000];

int min_cardinality(int n) {
	int groups = 0;
	for (int l = 1; l < 1001; l++){
		int g = 0;
		for (int i = 0; i < n; i++){
			if (inside[i]) continue;
			move_inside(i);
			if (press_button() > l){
				move_outside(i);
			} else {
				g++;
				inside[i] = 1;
			}
		}
		if (groups == 0){
			groups = g;
		} else if (g < groups){
			return l-1;
		}
	}
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 100 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 9 ms 344 KB Output is correct
9 Correct 4 ms 344 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 16 ms 344 KB Output is correct
15 Correct 8 ms 344 KB Output is correct
16 Correct 10 ms 344 KB Output is correct
17 Correct 5 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 4 ms 344 KB Output is correct
20 Correct 1 ms 344 KB Output is correct
21 Correct 2 ms 344 KB Output is correct
22 Correct 2 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 100 ms 344 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 9 ms 344 KB Output is correct
9 Correct 4 ms 344 KB Output is correct
10 Correct 2 ms 344 KB Output is correct
11 Correct 2 ms 344 KB Output is correct
12 Correct 3 ms 344 KB Output is correct
13 Correct 2 ms 344 KB Output is correct
14 Correct 16 ms 344 KB Output is correct
15 Correct 8 ms 344 KB Output is correct
16 Correct 10 ms 344 KB Output is correct
17 Correct 5 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 4 ms 344 KB Output is correct
20 Correct 1 ms 344 KB Output is correct
21 Correct 2 ms 344 KB Output is correct
22 Correct 2 ms 344 KB Output is correct
23 Incorrect 268 ms 340 KB Too many queries.
24 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Incorrect 242 ms 344 KB Too many queries.
8 Halted 0 ms 0 KB -