제출 #1132417

#제출 시각아이디문제언어결과실행 시간메모리
1132417vicvicBalloons (CEOI11_bal)C++20
0 / 100
104 ms2584 KiB
#include <iostream> #include <fstream> #include <stack> #include <iomanip> #define double long double using namespace std; int n; stack <pair <int, int>> stiva; int 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...