QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#424623 | #7276. A Light Inconvenience | Lynkcat# | 0 | 89ms | 3900kb | C++20 | 1.0kb | 2024-05-29 14:28:50 | 2024-05-29 14:28:50 |
Judging History
answer
#include <bits/stdc++.h>
#include "light.h"
// #include "sample_grader.cpp"
using namespace std;
namespace
{
long long N = 1;
vector<long long> v;
}
void prepare() {
v.push_back(1);
}
vector<long long> get() {
vector<long long>res=v;
for (auto &u:res) u=N-u+1;
reverse(res.begin(),res.end());
return res;
}
pair<long long, vector<long long>> join(long long p) {
N += p;
while (v.back()!=N)
{
long long n=v.back()*2+1;
if (n>N)
{
v.push_back(N);
} else v.push_back(n);
}
return {p, get()};
}
pair<long long, vector<long long>> leave(long long p) {
N -= p;
vector<long long>res;
long long nw=0;
while (nw<N)
{
long long rl=2*nw+1;
for (auto u:v)
{
if (u-2*p>2*nw+1) break;
rl=min(2*nw+1,u-p);
}
assert(rl>nw);
res.push_back(rl);
nw=rl;
}
v=res;
return {p, get()};
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 5
Accepted
time: 1ms
memory: 3628kb
input:
\x03
output:
result:
ok Correct
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 3664kb
input:
output:
result:
wrong answer Not correct
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 5
Accepted
time: 0ms
memory: 3568kb
input:
\x03
output:
result:
ok Correct
Test #13:
score: 5
Accepted
time: 39ms
memory: 3784kb
input:
!\x02
output:
result:
ok Correct
Test #14:
score: 0
Wrong Answer
time: 1ms
memory: 3900kb
input:
\x02
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Wrong Answer
Test #24:
score: 10
Accepted
time: 0ms
memory: 3824kb
input:
\x03
output:
result:
ok Correct
Test #25:
score: 10
Accepted
time: 89ms
memory: 3788kb
input:
!\x02
output:
result:
ok Correct
Test #26:
score: 0
Wrong Answer
time: 1ms
memory: 3824kb
input:
\x02
output:
result:
wrong answer Not correct
Subtask #4:
score: 0
Wrong Answer
Test #48:
score: 5
Accepted
time: 0ms
memory: 3824kb
input:
\x03
output:
result:
ok Correct
Test #49:
score: 5
Accepted
time: 54ms
memory: 3596kb
input:
!\x02
output:
result:
ok Correct
Test #50:
score: 0
Wrong Answer
time: 2ms
memory: 3544kb
input:
\x02
output:
result:
wrong answer Not correct
Subtask #5:
score: 0
Wrong Answer
Test #84:
score: 10
Accepted
time: 0ms
memory: 3624kb
input:
\x03
output:
result:
ok Correct
Test #85:
score: 10
Accepted
time: 24ms
memory: 3808kb
input:
!\x02
output:
result:
ok Correct
Test #86:
score: 0
Wrong Answer
time: 0ms
memory: 3544kb
input:
\x02
output:
result:
wrong answer Not correct
Subtask #6:
score: 0
Wrong Answer
Test #132:
score: 5
Accepted
time: 0ms
memory: 3620kb
input:
\x03
output:
result:
ok Correct
Test #133:
score: 5
Accepted
time: 65ms
memory: 3632kb
input:
!\x02
output:
result:
ok Correct
Test #134:
score: 0
Wrong Answer
time: 0ms
memory: 3896kb
input:
\x02
output:
result:
wrong answer Not correct
Subtask #7:
score: 0
Wrong Answer
Test #192:
score: 60
Accepted
time: 1ms
memory: 3620kb
input:
\x03
output:
result:
ok Correct
Test #193:
score: 0
Wrong Answer
time: 1ms
memory: 3660kb
input:
output:
result:
wrong answer Not correct