Submission #871969

#TimeUsernameProblemLanguageResultExecution timeMemory
87196912345678Balloons (CEOI11_bal)C++17
20 / 100
5 ms604 KiB
#include <bits/stdc++.h> using namespace std; const int nx=2e3+5; int n, x[nx]; double dp[nx]; int main() { cin.tie(NULL)->sync_with_stdio(false); cin>>n; for (int i=1; i<=n; i++) cin>>x[i]>>dp[i]; for (int i=1; i<=n; i++) for (int j=1; j<i; j++) dp[i]=min(dp[i], (((x[i]-x[j])*(x[i]-x[j]))/(4*dp[j]))); for (int i=1; i<=n; i++) printf("%.3f\n", dp[i]); }
#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...