제출 #1123287

#제출 시각아이디문제언어결과실행 시간메모리
1123287heeyBalloons (CEOI11_bal)C++20
60 / 100
2096 ms3396 KiB
#include<bits/stdc++.h> #define f first #define s second #define all(x) (x).begin(), (x).end() #define mod 1'000'000'007 #define inf 1'000'000'000'000'00 #define pb push_back #define vvi vector<vi> #define fst ios_base::sync_with_stdio(0);cin.tie(0); using namespace std; int x[200005], r[200005]; signed main(){ fst int n; cin >> n; for(int i = 0; i < n; i++){ cin >> x[i] >> r[i]; } vector<double> ans(n); for(int i = 0; i < n; i++){ ans[i] = r[i]; for(int j = 0; j < i; j++){ int dst = x[i] - x[j]; ans[i] = min(ans[i], (double)dst*dst/(4*ans[j])); } } cout << fixed << setprecision(3); for(int i = 0; i < n; i++) cout << ans[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...