Submission #858674

# Submission time Handle Problem Language Result Execution time Memory
858674 2023-10-09T04:27:42 Z thinknoexit Rarest Insects (IOI22_insects) C++17
0 / 100
0 ms 344 KB
#include <bits/stdc++.h>
#include "insects.h"
using namespace std;
using ll = long long;
bool ch[2020];
int min_cardinality(int n) {
    int mn = n;
    for (int i = 0;i < n;i++) {
        if (ch[i]) continue;
        ch[i] = 1;
        int cnt = 1;
        move_inside(i);
        for (int j = i + 1;j < n;j++) {
            move_inside(j);
            if (press_button() == 2) {
                cnt++;
                ch[j] = 1;
            }
            move_outside(j);
        }
        mn = min(mn, cnt);
    }
    return mn;
}
# Verdict Execution time Memory Grader output
1 Correct 0 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 Incorrect 0 ms 344 KB Wrong answer.
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 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 Incorrect 0 ms 344 KB Wrong answer.
5 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 -