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 "light.h"
#include <bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;
const int N=705;
bool a[N];
int n;
void prepare(){
a[1]=1;
n=1;
}
std::pair<long long, std::vector<long long>> join(long long p){
n+=p;
memset(a,0,sizeof(a));
for (int i=1;i<=n;i+=4) a[i]=1;
a[n]=1;
vector<int> v;
for (int i=1;i<=n;i++) if (a[i]) v.pb(i);
return {p,v};
}
std::pair<long long, std::vector<long long>> leave(long long p){
n-=p;
memset(a,0,sizeof(a));
for (int i=1;i<=n;i+=4) a[i]=1;
a[n]=1;
vector<int> v;
for (int i=1;i<=n;i++) if (a[i]) v.pb(i);
return {5,v};
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |