QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#738947#7276. A Light Inconvenienceliuziao0 75ms3840kbC++231006b2024-11-12 20:22:012024-11-12 20:22:28

Judging History

你现在查看的是最新测评结果

  • [2024-11-12 20:22:28]
  • 评测
  • 测评结果:0
  • 用时:75ms
  • 内存:3840kb
  • [2024-11-12 20:22:01]
  • 提交

answer

#include <bits/stdc++.h>
#include "light.h"

#ifdef ORZXKR
#include "sample_grader.cpp"
#endif

const int kMaxt = 155;

int64_t n = 1, t = 0;
int64_t f[kMaxt], g[kMaxt];

void prepare() {
  f[t = 1] = 1;
}

std::pair<long long, std::vector<long long>> join(long long p) {
  n += p;
  for (;;) {
    if (f[t] == n) break;
    f[t + 1] = std::min<int64_t>(2ll * f[t] + 1, n);
    ++t;
  }
  std::vector<long long> vec;
  for (int i = t; i; --i) vec.emplace_back(n + 1 - f[i]);
  return {p, vec};
}

std::pair<long long, std::vector<long long>> leave(long long p) {
  n -= p;
  int _t = 0;
  g[_t = 1] = 1;
  for (int i = 1;;) {
    if (g[_t] == n) break;
    for (; i < t && f[i + 1] - 2ll * p <= 2ll * g[_t] + 1; ++i) {}
    g[_t + 1] = std::min<int64_t>({n, f[i] - p, 2ll * g[_t] + 1});
    ++_t;
  }
  t = _t;
  for (int i = 1; i <= t; ++i) f[i] = g[i];
  std::vector<long long> vec;
  for (int i = t; i; --i) vec.emplace_back(n + 1 - f[i]);
  return {p, vec};
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 1ms
memory: 3564kb

input:

\x03

output:


result:

ok Correct

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3568kb

input:


output:


result:

wrong answer Not correct

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 5
Accepted
time: 0ms
memory: 3592kb

input:

\x03

output:


result:

ok Correct

Test #13:

score: 5
Accepted
time: 60ms
memory: 3528kb

input:

!\x02

output:


result:

ok Correct

Test #14:

score: 0
Wrong Answer
time: 0ms
memory: 3604kb

input:

\x02

output:


result:

wrong answer Not correct

Subtask #3:

score: 0
Wrong Answer

Test #24:

score: 10
Accepted
time: 0ms
memory: 3600kb

input:

\x03

output:


result:

ok Correct

Test #25:

score: 10
Accepted
time: 62ms
memory: 3604kb

input:

!\x02

output:


result:

ok Correct

Test #26:

score: 0
Wrong Answer
time: 1ms
memory: 3512kb

input:

\x02

output:


result:

wrong answer Not correct

Subtask #4:

score: 0
Wrong Answer

Test #48:

score: 5
Accepted
time: 1ms
memory: 3532kb

input:

\x03

output:


result:

ok Correct

Test #49:

score: 5
Accepted
time: 60ms
memory: 3828kb

input:

!\x02

output:


result:

ok Correct

Test #50:

score: 0
Wrong Answer
time: 0ms
memory: 3576kb

input:

\x02

output:


result:

wrong answer Not correct

Subtask #5:

score: 0
Wrong Answer

Test #84:

score: 10
Accepted
time: 0ms
memory: 3824kb

input:

\x03

output:


result:

ok Correct

Test #85:

score: 10
Accepted
time: 72ms
memory: 3564kb

input:

!\x02

output:


result:

ok Correct

Test #86:

score: 0
Wrong Answer
time: 1ms
memory: 3568kb

input:

\x02

output:


result:

wrong answer Not correct

Subtask #6:

score: 0
Wrong Answer

Test #132:

score: 5
Accepted
time: 0ms
memory: 3632kb

input:

\x03

output:


result:

ok Correct

Test #133:

score: 5
Accepted
time: 75ms
memory: 3544kb

input:

!\x02

output:


result:

ok Correct

Test #134:

score: 0
Wrong Answer
time: 1ms
memory: 3628kb

input:

\x02

output:


result:

wrong answer Not correct

Subtask #7:

score: 0
Wrong Answer

Test #192:

score: 60
Accepted
time: 0ms
memory: 3840kb

input:

\x03

output:


result:

ok Correct

Test #193:

score: 0
Wrong Answer
time: 0ms
memory: 3628kb

input:


output:


result:

wrong answer Not correct