제출 #224528

#제출 시각아이디문제언어결과실행 시간메모리
224528T0p_Rice Hub (IOI11_ricehub)C++14
0 / 100
9 ms512 KiB
#include <bits/stdc++.h>
#include "ricehub.h"
using namespace std;

int besthub(int R, int L, int X[], long long B)
{
	int ans = 0;
	for(int i=0 ; i<R ; i++)
	{
		long long temp = B;
		int now = 1, j = i+1;
		while(j < R)
		{
			if(temp < X[j] - X[i]) break ;
			temp -= X[j] - X[i];
			j++;
			now++;
		}
		ans = max(ans, now);

	}
	return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...