Submission #648130

#TimeUsernameProblemLanguageResultExecution timeMemory
648130parsadox2Balloons (CEOI11_bal)C++14
0 / 100
24 ms620 KiB
#include <bits/stdc++.h> using namespace std; const int maxn = 2e3 + 10; int n , ps[maxn]; long double r[maxn]; int main() { cin >> n ; for(int i = 0 ; i < n ; i++) cin >> ps[i] >> r[i]; for(int i = 2 ; i < n ; i++) { for(int j = 0 ; j < i ; j++) { long double tmp = 1.0 * (ps[i] - ps[j]) / (1.0 * 4 * r[j]); tmp = 1.0 * tmp * (ps[i] - ps[j]); r[i] = min(r[i] , tmp); } } for(int i = 0 ; i < n ; i++) { cout << setprecision(3) << fixed << r[i] << endl; } return 0; }
#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...