Submission #919365

#TimeUsernameProblemLanguageResultExecution timeMemory
919365buzdiBalloons (CEOI11_bal)C++11
50 / 100
2029 ms10300 KiB
//#include <fstream> #include <iostream> #include <stack> #include <queue> #include <algorithm> #include <vector> #include <cassert> #include <map> #include <iomanip> #define ll long long using namespace std; const int NMAX = 2e5; struct Point { long double x, y; void Read() { cin >> x >> y; } }; int n; Point a[NMAX + 1]; long double answer[NMAX + 1]; stack<Point> st; long double Square(long double x) { return x * x; } long double Radius(Point p1, Point p2) { return Square(p2.x - p1.x) / (4.0 * p1.y); } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) a[i].Read(); for (int i = 1; i <= n; i++) for (int j = 1; j < i; j++) a[i].y = min(a[i].y, Radius(a[j], a[i])); for (int i = 1; i <= n; i++) cout << fixed << setprecision(3) << a[i].y << '\n'; 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...