Submission #200627

# Submission time Handle Problem Language Result Execution time Memory
200627 2020-02-07T16:31:50 Z gs18115 Sparklers (JOI17_sparklers) C++14
0 / 100
5 ms 248 KB
#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
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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -