제출 #7324

#제출 시각아이디문제언어결과실행 시간메모리
7324kriii쌀 창고 (IOI11_ricehub)C++98
100 / 100
20 ms4992 KiB
int besthub(int N, int L, int *X, long long B)
{
	int A = 0, i = 0, j = 0; long long S = 0;
	while (j < N){
		S += X[j++] - X[(i+j)/2];
		while (S > B) S -= X[(i+j)/2] - X[i++];
		if (A < j - i) A = j - i;
	}
	return A;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...