Submission #200627

#TimeUsernameProblemLanguageResultExecution timeMemory
200627gs18115Sparklers (JOI17_sparklers)C++14
0 / 100
5 ms248 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...