This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define semicolon ;
#define ryan bear
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
int x[100010];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n,k,t;
cin>>n>>k>>t;
for(int i=0;i<n;i++)
cin>>x[i];
int s=0;
for(int i=1;i<n;i++)
{
int m=inf;
for(int j=max(k-i,0);j<=k&&j+i<n;j++)
m=min(m,x[j+i]-x[j]);
s=max(s,(m+i-1)/i);
}
cout<<(s+t*2-1)/t/2<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |