이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
const int LOG = 63;
int sz;
int cnt;
bool flag;
vector<long long> indices;
void prepare(){
cnt = 0;
sz = 1;
indices.push_back(1);
}
pair<long long, vector<long long>> join(long long p){
cnt++;
sz += p;
vector<long long> nindices;
for (int i = 1; i < sz; i += 5) {
nindices.push_back(i);
}
nindices.push_back(sz);
indices = nindices;
return {5 * p, indices};
}
pair<long long, vector<long long>> leave(long long p){// I just need to make sure after one leave I'm able to keep the rightmost lit
cnt++;
sz -= p;
vector<long long> nindices;
for (int i = 1; i < sz; i += 5) {
nindices.push_back(i);
}
nindices.push_back(sz);
indices = nindices;
return {5 * p, indices};
}
# | 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... |