Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- int main()
- {
- ll n,l;
- cin>>n>>l;
- ll ara[n+1];
- for(int i=0;i<n;i++)cin>>ara[i];
- sort(ara,ara+n);
- ll r= max(ara[0],l-ara[n-1])*2;
- for(int i=0;i<n-1;i++)
- r=max(r,ara[i+1]-ara[i]);
- cout.precision(20);
- cout<<fixed<<r/2.0<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement