# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1124323 | epicci23 | Rarest Insects (IOI22_insects) | C++17 | 165 ms | 20156 KiB |
#include "insects.h"
#include "bits/stdc++.h"
using namespace std;
const int N = 2e3 + 5;
map<vector<int>,int> Cache;
int vis[N], Kill[N] , D , tot = 0;
inline bool Add(int x){
if(vis[x] || Kill[x]) return 0;
vis[x]=1;
tot++;
move_inside(x);
return 1;
}
inline bool Rem(int x){
if(!vis[x] || Kill[x]) return 0;
vis[x]=0;
tot--;
move_outside(x);
return 1;
}
inline int Get(){
vector<int> v;
for(int i=0;i<N;i++) if(vis[i]) v.push_back(i);
if(Cache.count(v)) return Cache[v];
return Cache[v] = press_button();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |