Submission #965012

#TimeUsernameProblemLanguageResultExecution timeMemory
965012pccMobile (BOI12_mobile)C++17
50 / 100
358 ms8244 KiB
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3,unroll-loop") #pragma GCC target("avx2,popcnt,sse4") #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second #define tlll tuple<ll,ll,ll> #define ld double #define pld pair<ld,ld> const int mxn = 1e6+10; ll N,L; pair<ll,ll> arr[mxn]; inline bool check(ld r){ vector<pld> v; for(int i = 0;i<N;i++){ if(r<abs(arr[i].sc))continue; v.push_back(pld(arr[i].fs-sqrt(r*r-arr[i].sc*arr[i].sc),arr[i].fs+sqrt(r*r-arr[i].sc*arr[i].sc))); } sort(v.begin(),v.end()); ld pre = 0; for(auto &i:v){ if(pre>L)return true; if(pre<i.fs)return false; pre = max(pre,i.sc); } return pre>L; } int main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); ld l = 0,r = 2e9; cin>>N>>L; if(N>1e5)exit(0); for(int i = 0;i<N;i++)cin>>arr[i].fs>>arr[i].sc; for(int i = 0;i<45;i++){ ld mid = (l+r)/2; if(check(mid))r = mid; else l = mid; } cout<<fixed<<setprecision(10)<<l<<'\n'; return 0; }

Compilation message (stderr)

mobile.cpp:4:38: warning: bad option '-funroll-loop' to pragma 'optimize' [-Wpragmas]
    4 | #pragma GCC optimize("O3,unroll-loop")
      |                                      ^
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
    5 | #pragma GCC target("avx2,popcnt,sse4")
      |                                      ^
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning: bad option '-funroll-loop' to attribute 'optimize' [-Wattributes]
mobile.cpp:5:38: warning
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...