QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#643807#4. Gapmakrav0 0ms5864kbC++20468b2024-10-16 01:05:302024-10-16 01:05:30

Judging History

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

  • [2024-10-16 01:05:30]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:5864kb
  • [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