이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <iomanip>
#include <stack>
using namespace std;
int n;
struct ballon
{ double x,r;
}b,c;
stack <ballon> s;
int main()
{ cin>>n;
for(int i=1;i<=n;i++)
{ cin>>b.x>>b.r;
while(!s.empty())
{ c=s.top();
b.r=min(b.r,(c.x-b.x)*(c.x-b.x)/(4*c.r));
if(b.r>c.r)
s.pop();
else
break;
}
s.push(b);
cout<<fixed<<setprecision(3)<<b.r<<'\n';
}
return 0;
}
# | 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... |