QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#492080#4. GapKiharaTouma#Compile Error//C++23345b2024-07-26 09:06:012024-07-26 09:06:02

Judging History

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

  • [2024-07-26 09:06:02]
  • 评测
  • [2024-07-26 09:06:01]
  • 提交

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 | }
      | ^