# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
919365 |
2024-01-31T16:38:16 Z |
buzdi |
Balloons (CEOI11_bal) |
C++11 |
|
2000 ms |
10300 KB |
//#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 time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
10 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2648 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2392 KB |
505 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
2392 KB |
2000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1142 ms |
2912 KB |
20000 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2019 ms |
5208 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2029 ms |
5968 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2005 ms |
8260 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2021 ms |
8784 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2027 ms |
10300 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |