QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#643807 | #4. Gap | makrav | 0 | 0ms | 5864kb | C++20 | 468b | 2024-10-16 01:05:30 | 2024-10-16 01:05:30 |
answer
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
long long findGap(int T, int N) {
if (T == 1) {
ll lf = -1, rg = 1e18 + 1, bs = 0;
for (int j = 0; j < (N + 1) / 2; j++) {
ll* mn, *mx;
MinMax(lf + 1, rg - 1, mn, mx);
if (lf != -1) bs = max(bs, lf - (*mn));
if (rg != 1e18 + 1) bs = max(bs, rg - (*mx));
bs = max(bs, (*mx) - (*mn));
lf = *mn; rg = *mx;
}
return bs;
}
return 0;
}
详细
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
1 2 29659227736649406 728704890713443211
output:
Unauthorized output
result:
Subtask #2:
score: 0
Wrong Answer
Test #33:
score: 0
Wrong Answer
time: 0ms
memory: 5864kb
input:
2 2 78103569500113815 605712887753065418
output:
0 0
result:
wrong answer returned 0 but expected 527609318252951603