QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#508437 | #7276. A Light Inconvenience | bachbeo2007 | 5 | 126ms | 3808kb | C++23 | 816b | 2024-08-07 15:24:37 | 2024-08-07 15:24:37 |
Judging History
answer
#include <bits/stdc++.h>
#include "light.h"
using namespace std;
#define ll long long
ll n=1;
vector<ll> f;
vector<ll> get(){
vector<ll> a=f;
for(ll &x:a) x=n+1-x;
reverse(a.begin(),a.end());
return a;
}
void prepare() {
f.push_back(1);
}
pair<ll, vector<ll>> join(ll p) {
n+=p;
while((int)f.size()>2 && f.back()!=f.end()[-2]*2+1) f.pop_back();
while(f.back()<n){
ll x=min(n,f.back()*2+1);
f.push_back(x);
}
return {p,get()};
}
pair<ll, vector<ll>> leave(ll p) {
n-=p;
vector<ll> g;
ll x=0;
while(x<n){
ll y=2*x+1;
for(ll u:f){
if(u-2*p>2*x+1) break;
y=min(u-p,2*x+1);
}
g.push_back(y),x=y;
}
f=g;
return {p,get()};
}
#undef ll
詳細信息
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3568kb
input:
\x03
output:
result:
ok Correct
Test #2:
score: 5
Accepted
time: 46ms
memory: 3580kb
input:
output:
result:
ok Correct
Test #3:
score: 5
Accepted
time: 61ms
memory: 3808kb
input:
Ĝ\x0e]B
output:
result:
ok Correct
Test #4:
score: 5
Accepted
time: 49ms
memory: 3596kb
input:
output:
result:
ok Correct
Test #5:
score: 5
Accepted
time: 46ms
memory: 3732kb
input:
Q
output:
result:
ok Correct
Test #6:
score: 5
Accepted
time: 29ms
memory: 3552kb
input:
\x03~
output:
result:
ok Correct
Test #7:
score: 5
Accepted
time: 39ms
memory: 3808kb
input:
output:
result:
ok Correct
Test #8:
score: 5
Accepted
time: 47ms
memory: 3464kb
input:
\x11!
output:
result:
ok Correct
Test #9:
score: 5
Accepted
time: 67ms
memory: 3576kb
input:
mΖ
output:
result:
ok Correct
Test #10:
score: 5
Accepted
time: 14ms
memory: 3572kb
input:
2h\x0e
output:
result:
ok Correct
Test #11:
score: 5
Accepted
time: 61ms
memory: 3600kb
input:
\5
output:
result:
ok Correct
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 5
Accepted
time: 1ms
memory: 3804kb
input:
\x03
output:
result:
ok Correct
Test #13:
score: 0
Wrong Answer
time: 6ms
memory: 3760kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Wrong Answer
Test #24:
score: 10
Accepted
time: 1ms
memory: 3532kb
input:
\x03
output:
result:
ok Correct
Test #25:
score: 0
Wrong Answer
time: 3ms
memory: 3760kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #4:
score: 0
Wrong Answer
Test #48:
score: 5
Accepted
time: 0ms
memory: 3508kb
input:
\x03
output:
result:
ok Correct
Test #49:
score: 0
Wrong Answer
time: 4ms
memory: 3576kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #5:
score: 0
Wrong Answer
Test #84:
score: 10
Accepted
time: 1ms
memory: 3676kb
input:
\x03
output:
result:
ok Correct
Test #85:
score: 0
Wrong Answer
time: 0ms
memory: 3568kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #6:
score: 0
Wrong Answer
Test #132:
score: 5
Accepted
time: 0ms
memory: 3572kb
input:
\x03
output:
result:
ok Correct
Test #133:
score: 0
Wrong Answer
time: 4ms
memory: 3504kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #7:
score: 0
Wrong Answer
Test #192:
score: 60
Accepted
time: 1ms
memory: 3796kb
input:
\x03
output:
result:
ok Correct
Test #193:
score: 60
Accepted
time: 42ms
memory: 3512kb
input:
output:
result:
ok Correct
Test #194:
score: 60
Accepted
time: 126ms
memory: 3580kb
input:
output:
result:
ok Correct
Test #195:
score: 0
Wrong Answer
time: 5ms
memory: 3568kb
input:
output:
result:
wrong answer Not correct