| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1342686 | iitprep3 | Mobile (BOI12_mobile) | C++20 | 362 ms | 16996 KiB |
/**
/> フ
| _ _|
/`ミ _x ノ
/ |
/ ヽ ?
/ ̄| | | |
| ( ̄ヽ__ヽ_)_)
\二つ
**/
#include <bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
typedef __gnu_pbds::tree<int, __gnu_pbds::null_type, less<int>,__gnu_pbds::rb_tree_tag,
__gnu_pbds::tree_order_statistics_node_update> ordered_set;
#define int long long
#define vi vector<long long>
#define vpi vector<pair<long long ,long long>>
#define msi multiset <long long>
#define msp multiset < pair<long long ,long long>>
#define si set <long long>
#define sp set < pair<long long ,long long>>
#define mp map<long long ,long long>
#define all(v) v.begin() , v.end()
#define frieren for(int i = 0; i < n ; i++)
#define s(v) sort(all(v))
int n,k,q ,m , testcase = 1;
string s;
void vi_in(vi &v, int l = n);
int ceill(int a , int b);
void test();
void solve()
{
cin >> n >> m;
vpi v ;
frieren
{
int x , y ;
cin >> x >> y ;
v.emplace_back(x , y);
}
s(v);
long double l = 0.0 , r = 5e9;
while ((r - l) >= 1e-3)
{
long double mid = (l + r)/2;
long double bound = 0 ;
frieren
{
long double delta = sqrtl(max((long double)0 , mid*mid - v[i].second*v[i].second));
long double xa, xb ;
xa = v[i].first - delta ;
xb = v[i].first + delta ;
if(xa <= bound){
bound = max(xb , bound) ;
}
}
if(bound >= m){
r = mid;
}else l = mid;
}
cout << fixed << setprecision(4) <<l << endl;
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
// test();
solve();
return 0;
}
void test(){
cin >> testcase;
while (testcase--)
{
solve();
}
}
void vi_in(vi &v, int l)
{
for (int i = 0; i < l; i++)
{
int x ; cin >> x ;
v.push_back(x);;
}
}
int ceill(int a , int b){
if(a%b) return a/b + 1;
return a/b;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
