Submission #786156

#TimeUsernameProblemLanguageResultExecution timeMemory
786156khshgRarest Insects (IOI22_insects)C++17
0 / 100
245 ms256 KiB
#include"insects.h" #include<bits/stdc++.h> using namespace std; int min_cardinality(int N) { set<int> alr; int pr = -1; for(int j = 1; j < 100; ++j) { int cnt = 0; for(int i = 0; i < N; ++i) { if(!alr.insert(i).second) continue; move_inside(i); int ks = press_button(); if(ks == j) { ++cnt; continue; } alr.erase(i); move_outside(i); } if(j > 1 && cnt != pr) { return j - 1; } pr = cnt; } return -1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...