# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
230034 | 2020-05-07T20:27:57 Z | infinite_iq | Mobile (BOI12_mobile) | C++14 | 691 ms | 35576 KB |
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #include <bits/stdc++.h> using namespace std; #define sqr 547 #define mp make_pair #define mid (l+r)/2 #define pb push_back #define ppb pop_back #define fi first #define se second #define lb lower_bound #define ub upper_bound #define ins insert #define era erase #define C continue #define mem(dp,i) memset(dp,i,sizeof(dp)) #define mset multiset #define all(x) x.begin(), x.end() typedef long long ll; typedef short int si; typedef long double ld; typedef pair<int,int> pi; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pi> vpi; typedef vector<pll> vpll; const ll inf=1e18; const ll mod=1e9+7; const ld pai=acos(-1); ll N , En ; pll A [1000009] ; bool Check ( double Mid ) { double Mx = 0 ; for ( int i = 0 ; i < N ; i ++ ) { double Len = sqrt ( Mid * Mid - A [i] .se * A [i] .se ) ; double L = A [i].fi - Len , R = A [i].fi + Len ; if ( L <= Mx ) Mx = max ( Mx , R ) ; } return ( Mx >= En ) ; } int main () { cin >> N >> En ; for ( int i = 0 ; i < N ; i ++ ) scanf("%lld%lld",&A[i].fi,&A[i].se) ; double L = 1 , R = 5e8 ; while ( R - L > 0.001 ) { double Mid = ( L + R ) / 2.0 ; if ( Check ( Mid ) ) R = Mid ; else L = Mid ; } cout << fixed << setprecision (4) << L << endl ; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Output is correct |
2 | Correct | 4 ms | 256 KB | Output is correct |
3 | Correct | 4 ms | 256 KB | Output is correct |
4 | Correct | 4 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 4 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 6 ms | 384 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 512 KB | Output is correct |
2 | Correct | 6 ms | 516 KB | Output is correct |
3 | Correct | 7 ms | 512 KB | Output is correct |
4 | Correct | 7 ms | 512 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 384 KB | Output is correct |
2 | Correct | 6 ms | 512 KB | Output is correct |
3 | Correct | 6 ms | 384 KB | Output is correct |
4 | Correct | 7 ms | 512 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 8 ms | 512 KB | Output is correct |
3 | Correct | 6 ms | 384 KB | Output is correct |
4 | Correct | 8 ms | 512 KB | Output is correct |
5 | Correct | 7 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 43 ms | 2176 KB | Output is correct |
2 | Correct | 35 ms | 2304 KB | Output is correct |
3 | Correct | 29 ms | 1664 KB | Output is correct |
4 | Correct | 49 ms | 2304 KB | Output is correct |
5 | Correct | 25 ms | 1536 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 40 ms | 2176 KB | Output is correct |
2 | Correct | 42 ms | 2176 KB | Output is correct |
3 | Correct | 47 ms | 2304 KB | Output is correct |
4 | Correct | 51 ms | 2296 KB | Output is correct |
5 | Correct | 60 ms | 2424 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 35 ms | 2304 KB | Output is correct |
2 | Correct | 38 ms | 2808 KB | Output is correct |
3 | Correct | 37 ms | 2560 KB | Output is correct |
4 | Correct | 73 ms | 2940 KB | Output is correct |
5 | Correct | 47 ms | 2432 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 42 ms | 3064 KB | Output is correct |
2 | Correct | 42 ms | 3064 KB | Output is correct |
3 | Correct | 43 ms | 2816 KB | Output is correct |
4 | Correct | 72 ms | 2936 KB | Output is correct |
5 | Correct | 57 ms | 2680 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 3064 KB | Output is correct |
2 | Correct | 42 ms | 3064 KB | Output is correct |
3 | Correct | 41 ms | 2812 KB | Output is correct |
4 | Correct | 73 ms | 3064 KB | Output is correct |
5 | Correct | 58 ms | 2680 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 172 ms | 9336 KB | Output is correct |
2 | Correct | 208 ms | 8952 KB | Output is correct |
3 | Correct | 199 ms | 9080 KB | Output is correct |
4 | Correct | 341 ms | 9184 KB | Output is correct |
5 | Correct | 281 ms | 8952 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 195 ms | 9208 KB | Output is correct |
2 | Correct | 293 ms | 8952 KB | Output is correct |
3 | Correct | 201 ms | 9056 KB | Output is correct |
4 | Correct | 334 ms | 8952 KB | Output is correct |
5 | Correct | 284 ms | 8952 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 189 ms | 10832 KB | Output is correct |
2 | Correct | 238 ms | 10488 KB | Output is correct |
3 | Correct | 229 ms | 10484 KB | Output is correct |
4 | Correct | 405 ms | 10616 KB | Output is correct |
5 | Correct | 324 ms | 10528 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 236 ms | 10800 KB | Output is correct |
2 | Correct | 345 ms | 10616 KB | Output is correct |
3 | Correct | 232 ms | 10616 KB | Output is correct |
4 | Correct | 406 ms | 10488 KB | Output is correct |
5 | Correct | 343 ms | 10488 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 216 ms | 12280 KB | Output is correct |
2 | Correct | 268 ms | 12024 KB | Output is correct |
3 | Correct | 264 ms | 12024 KB | Output is correct |
4 | Correct | 475 ms | 12024 KB | Output is correct |
5 | Correct | 385 ms | 20344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 276 ms | 12280 KB | Output is correct |
2 | Correct | 400 ms | 12152 KB | Output is correct |
3 | Correct | 282 ms | 12024 KB | Output is correct |
4 | Correct | 459 ms | 12024 KB | Output is correct |
5 | Correct | 401 ms | 21624 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 280 ms | 13944 KB | Output is correct |
2 | Correct | 311 ms | 13692 KB | Output is correct |
3 | Correct | 314 ms | 13432 KB | Output is correct |
4 | Correct | 532 ms | 13304 KB | Output is correct |
5 | Correct | 493 ms | 24056 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 326 ms | 13816 KB | Output is correct |
2 | Correct | 449 ms | 13560 KB | Output is correct |
3 | Correct | 327 ms | 22520 KB | Output is correct |
4 | Correct | 557 ms | 28536 KB | Output is correct |
5 | Correct | 461 ms | 24572 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 325 ms | 16888 KB | Output is correct |
2 | Correct | 392 ms | 16504 KB | Output is correct |
3 | Correct | 394 ms | 30712 KB | Output is correct |
4 | Correct | 691 ms | 35320 KB | Output is correct |
5 | Correct | 596 ms | 29604 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 415 ms | 16144 KB | Output is correct |
2 | Correct | 581 ms | 29432 KB | Output is correct |
3 | Correct | 409 ms | 28280 KB | Output is correct |
4 | Correct | 677 ms | 35576 KB | Output is correct |
5 | Correct | 633 ms | 30840 KB | Output is correct |