QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#796570 | #7276. A Light Inconvenience | omsincoconut | 0.833333 | 162ms | 3876kb | C++20 | 1.3kb | 2024-12-01 21:19:55 | 2024-12-01 21:20:00 |
Judging History
answer
#include "light.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> cur;
void prepare() {
cur = {1};
}
pair<ll, vector<ll>> join(ll p) {
ll cz = cur.back() + p;
vector<ll> newcur;
newcur.push_back(1);
for (ll i = 1; i <= cz; i *= 2) {
newcur.push_back(i);
newcur.push_back(cz-i+1);
}
sort(newcur.begin(), newcur.end());
newcur.resize(unique(newcur.begin(), newcur.end()) - newcur.begin());
vector<ll> actual;
ll t = 5*p;
for (ll i : newcur) {
ll gap = i - *(upper_bound(cur.begin(), cur.end(), i) - 1);
if (gap <= t) actual.push_back(i);
}
cur = actual;
return make_pair(t, cur);
}
pair<ll, vector<ll>> leave(ll p){
ll cz = cur.back() - p;
vector<ll> newcur;
newcur.push_back(1);
for (ll i = 1; i <= cz; i *= 2) {
newcur.push_back(i);
newcur.push_back(cz-i+1);
}
sort(newcur.begin(), newcur.end());
newcur.resize(unique(newcur.begin(), newcur.end()) - newcur.begin());
vector<ll> actual;
ll t = 5*p;
for (ll i : newcur) {
ll gap = i - *(upper_bound(cur.begin(), cur.end(), i) - 1);
if (gap <= t) actual.push_back(i);
}
cur = actual;
return make_pair(t, cur);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0.833333
Acceptable Answer
Test #1:
score: 0.833333
Acceptable Answer
time: 1ms
memory: 3600kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #2:
score: 0.833333
Acceptable Answer
time: 142ms
memory: 3852kb
input:
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #3:
score: 0.833333
Acceptable Answer
time: 116ms
memory: 3848kb
input:
Ĝ\x0e]B
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #4:
score: 0.833333
Acceptable Answer
time: 162ms
memory: 3832kb
input:
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #5:
score: 0.833333
Acceptable Answer
time: 152ms
memory: 3636kb
input:
Q
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #6:
score: 0.833333
Acceptable Answer
time: 160ms
memory: 3628kb
input:
\x03~
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #7:
score: 0.833333
Acceptable Answer
time: 103ms
memory: 3668kb
input:
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #8:
score: 0.833333
Acceptable Answer
time: 118ms
memory: 3512kb
input:
\x11!
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #9:
score: 0.833333
Acceptable Answer
time: 143ms
memory: 3564kb
input:
mΖ
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #10:
score: 0.833333
Acceptable Answer
time: 159ms
memory: 3624kb
input:
2h\x0e
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #11:
score: 0.833333
Acceptable Answer
time: 138ms
memory: 3568kb
input:
\5
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 0.833333
Acceptable Answer
time: 1ms
memory: 3604kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #13:
score: 0
Wrong Answer
time: 0ms
memory: 3764kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Wrong Answer
Test #24:
score: 1.66667
Acceptable Answer
time: 1ms
memory: 3768kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #25:
score: 0
Wrong Answer
time: 1ms
memory: 3832kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #4:
score: 0
Wrong Answer
Test #48:
score: 0.833333
Acceptable Answer
time: 1ms
memory: 3480kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #49:
score: 0
Wrong Answer
time: 1ms
memory: 3844kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #5:
score: 0
Wrong Answer
Test #84:
score: 1.66667
Acceptable Answer
time: 0ms
memory: 3640kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #85:
score: 0
Wrong Answer
time: 0ms
memory: 3832kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #6:
score: 0
Wrong Answer
Test #132:
score: 0.833333
Acceptable Answer
time: 1ms
memory: 3800kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #133:
score: 0
Wrong Answer
time: 1ms
memory: 3536kb
input:
!\x02
output:
result:
wrong answer Not correct
Subtask #7:
score: 0
Wrong Answer
Test #192:
score: 10
Acceptable Answer
time: 0ms
memory: 3600kb
input:
\x03
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #193:
score: 10
Acceptable Answer
time: 127ms
memory: 3568kb
input:
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #194:
score: 10
Acceptable Answer
time: 74ms
memory: 3876kb
input:
output:
result:
points 0.16666667160 points 0.16666667160 Partially correct
Test #195:
score: 0
Wrong Answer
time: 1ms
memory: 3616kb
input:
output:
result:
wrong answer Not correct