# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964054 | 2024-04-16T09:02:23 Z | Neco_arc | Mobile (BOI12_mobile) | C++17 | 505 ms | 31912 KB |
#include <bits/stdc++.h> #define ll long long #define all(x) x.begin(), x.end() #define Neco "Mobile" #define resp(x) sort(all(x)), x.resize(unique(all(x)) - x.begin()) #define getbit(x,i) ((x >> i)&1) #define _left id * 2, l, mid #define _right id * 2 + 1, mid + 1, r #define cntbit(x) __builtin_popcountll(x) #define fi(i, a, b) for(int i = a; i <= b; i++) #define fid(i, a, b) for(int i = a; i >= b; i--) #define maxn (int) 1e6 + 7 using namespace std; const ll mod = 1e9 + 7; //972663749 const ll base = 911382323; typedef long double ld; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll GetRandom(ll l, ll r) { return uniform_int_distribution<ll> (l, r)(rng); } int n, L; pair<ld, ld> a[maxn]; void solve() { cin >> n >> L; fi(i, 1, n) cin >> a[i].first >> a[i].second; ld l = 1, r = 1.5e9; int T = 32; while(T--) { ld mid = (l + r) / 2; ld Curr = 0; fi(i, 1, n) { ld L, R; if(mid < a[i].second) L = R = 0; else { ld len = sqrt( (mid * mid) - (a[i].second * a[i].second) ); L = a[i].first - len, R = a[i].first + len; } if(Curr >= L) Curr = max(Curr, R); } if(Curr >= L) r = mid; else l = mid; } cout << fixed << setprecision(5) << r; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); if(fopen(Neco".inp", "r")) { freopen(Neco".inp", "r", stdin); freopen(Neco".out", "w", stdout); } int nTest = 1; // cin >> nTest; while(nTest--) { solve(); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 604 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 604 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 604 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 39 ms | 4728 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 53 ms | 4700 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 40 ms | 4904 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 48 ms | 4692 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 50 ms | 4696 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 241 ms | 17292 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 260 ms | 17052 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 279 ms | 21152 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 291 ms | 21144 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 320 ms | 23124 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 348 ms | 23108 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 370 ms | 27304 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 390 ms | 27280 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 505 ms | 31912 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 495 ms | 31756 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |