QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#643813 | #4. Gap | makrav | 0 | 0ms | 5932kb | C++20 | 493b | 2024-10-16 01:18:14 | 2024-10-16 01:18:14 |
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;
ll *uk_mn{&mn}, *uk_mx{&mx};
MinMax(lf + 1, rg - 1, uk_mn, uk_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
Wrong Answer
Test #1:
score: 30
Accepted
time: 0ms
memory: 3776kb
input:
1 2 29659227736649406 728704890713443211
output:
699045662976793805 1
result:
points 1 M = 1
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 3888kb
input:
1 15 4910834401530995 82366510858893943 154224513006215114 167111470747458922 291518420333647381 360708376904159067 475438451423179257 514521822479974099 544779904916816505 631359818684602077 636047253191505154 815280682985156693 908104066692014481 977273719899584711 997330329109444588
output:
992419494707913593 8
result:
wrong answer returned 992419494707913593 but expected 179233429793651539
Subtask #2:
score: 0
Wrong Answer
Test #33:
score: 0
Wrong Answer
time: 0ms
memory: 5932kb
input:
2 2 78103569500113815 605712887753065418
output:
0 0
result:
wrong answer returned 0 but expected 527609318252951603