Submission #767257

#TimeUsernameProblemLanguageResultExecution timeMemory
767257AloraBalloons (CEOI11_bal)C++17
20 / 100
2054 ms5492 KiB
#include <bits/stdc++.h> #define name "cownav" #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 ll long long #define f first #define se second #define pii pair<int, int> #define getbit(i, j) ((i >> j) & 1) #define pb push_back #define all(v) v.begin(), v.end() #define maxn 200005 const int M = 1e9 + 7; using namespace std; int n, x[maxn]; double r[maxn]; signed main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); // freopen(name".in", "r", stdin); // freopen(name".out", "w", stdout); cin >> n; fi(i, 1, n) cin >> x[i] >> r[i]; fi(i, 2, n){ fi(j, 1, i - 1){ int A = (x[i] - x[j])*(x[i] - x[j]); double _r = A/(4*r[j]); r[i] = min(r[i], _r); } } fi(i, 1, n) cout << fixed << setprecision(3) << r[i] << '\n'; }
#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...