QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#492080 | #4. Gap | KiharaTouma# | Compile Error | / | / | C++23 | 345b | 2024-07-26 09:06:01 | 2024-07-26 09:06:02 |
Judging History
answer
//qoj4
long long findGap(int T, int n){
static long long a[100010];
if(T == 1){
a[0] = -1, a[n+1] = 1e18 + 1;
for(int i = 1, j = n; i <= j; ++ i, -- j){
MinMax(a[i-1] + 1, a[j+1] - 1, a[i], a[j]);
}
long long mx = 0;
for(int i = 1; i < n; ++ i){
mx = max(mx, a[i+1] - a[i]);
}
return mx;
} else {
}
}
Details
answer.code: In function ‘long long int findGap(int, int)’: answer.code:8:25: error: ‘MinMax’ was not declared in this scope 8 | MinMax(a[i-1] + 1, a[j+1] - 1, a[i], a[j]); | ^~~~~~ answer.code:12:30: error: ‘max’ was not declared in this scope; did you mean ‘mx’? 12 | mx = max(mx, a[i+1] - a[i]); | ^~~ | mx answer.code:18:1: warning: control reaches end of non-void function [-Wreturn-type] 18 | } | ^