# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
859261 | kim | 드문 곤충 (IOI22_insects) | C++17 | 112 ms | 1392 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "insects.h"
#include<bits/stdc++.h>
using namespace std;
#define in move_inside
#define press press_button
#define out move_outside
vector<int> vec0;
set<int> mp;
int p;
int n;
bool check(int k){
stack<int> st;
for(int i=0;i<n;++i){
if(mp.count(i)) continue;
in(i), st.push(i);
if(press()>k) out(i),st.pop();
}
int cnt=st.size()+p;
while(!st.empty()){
out(st.top());
st.pop();
}
if(cnt==p*k) return 1;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |