| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1338076 | xnoel | Balloons (CEOI11_bal) | C++20 | 368 ms | 1988 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
//freopen("1.in","r",stdin);
int n;
cin>>n;
stack<pair<long double,long double>> st;
st.push({-1000,1});
for (int i=0;i<n;i++) {
long double pos, max_r;
cin>>pos>>max_r;
long double curr_r=max_r;
while (!st.empty()){
long double last_pos=st.top().first, last_r=st.top().second;
curr_r = min(curr_r, (pos-last_pos)*(pos-last_pos)/(4*last_r));
if (curr_r>=last_r) st.pop();
else break;
}
st.push({pos,curr_r});
cout<<fixed<<setprecision(3)<<curr_r<<"\n";
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
