Submission #1132422

#TimeUsernameProblemLanguageResultExecution timeMemory
1132422vicvicBalloons (CEOI11_bal)C++20
100 / 100
89 ms1864 KiB
#include <iostream> #include <fstream> #include <stack> #include <iomanip> #define double long double #define int long long using namespace std; int n; stack <pair <int, double>> stiva; int32_t main() { ios :: sync_with_stdio (0); cin.tie (nullptr); cin >> n; for (int i=1;i<=n;i++) { int x, y; cin >> x >> y; double r=y; while (!stiva.empty()) { double len=(stiva.top().first-x)*(stiva.top().first-x); r=min (r, len/(4*stiva.top().second)); if (r>stiva.top().second-1e-10) { stiva.pop(); } else break; } cout << fixed << setprecision (3) << r << "\n"; stiva.push ({x, r}); } 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...