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 <vector>
using namespace std;
int cnt;
vector<long long>v;
void prepare(){
cnt = 1;
v.push_back(1);
}
std::pair<long long, std::vector<long long>> join(long long p){
v.clear();
cnt+=p;
v.clear();
for(int i=1;i<=cnt;i++) {
if(i%5==1)
v.push_back(i);
}
if(v.back()!=cnt)
v.push_back(cnt);
return {5*p,v};
}
std::pair<long long, std::vector<long long>> leave(long long p){
cnt-=p;
while(v.back()>cnt)
v.pop_back();
if(v.back()!=cnt)
v.push_back(cnt);
return {5*p,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... |