#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
248 KB |
Output is correct |
2 |
Incorrect |
5 ms |
248 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
248 KB |
Output is correct |
2 |
Incorrect |
5 ms |
248 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
248 KB |
Output is correct |
2 |
Incorrect |
5 ms |
248 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |