제출 #1123286

#제출 시각아이디문제언어결과실행 시간메모리
1123286danidelrioBalloons (CEOI11_bal)C++20
0 / 100
2096 ms4932 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<long long> x(n), r(n); vector<double> final_radius(n); for (int i = 0; i < n; ++i) { cin >> x[i] >> r[i]; } final_radius[0] = r[0]; for (int i = 1; i < n; ++i) { final_radius[i] = r[i]; for (int j = i - 1; j >= 0; --j) { long long dist = x[i] - x[j]; if (dist < final_radius[i] + final_radius[j]) { final_radius[i] = dist - final_radius[j]; } } } cout << fixed << setprecision(3); for (double radius : final_radius) { cout << radius << endl; } }
#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...