# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1005063 |
2024-06-22T06:51:18 Z |
Mubaris |
Balloons (CEOI11_bal) |
C++17 |
|
329 ms |
6232 KB |
#include<bits/stdc++.h>
using namespace std;
#define INF(t) numeric_limits<t>::max()
double f(int a,int b,int c,int d){
int dist=(b-a)*(b-a);
double ans=(double)dist/4;ans=(double)ans/d;
return (ans<=c?ans:0);
}
void solve(){
int a;cin>>a;
vector<int> b(a),c(a);
stack<int> st;
for(int i=0;i<a;i++) cin>>b[i]>>c[i];
for(int i=0;i<a;i++){
double ans=(double)c[i];
while(!st.empty()&&f(b[i],b[st.top()],c[i],c[st.top()])) {ans=f(b[i],b[st.top()],c[i],c[st.top()]);st.pop();}
st.push(i);
cout<<fixed<<setprecision(3)<<ans<<endl;
}
}
int main(){
int t=1;
while(t--) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
5th numbers differ - expected: '17.1630000000', found: '4.3710000000', error = '12.7920000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
2nd numbers differ - expected: '252735385.4379999936', found: '0.9330000000', error = '252735384.5049999952' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
3rd numbers differ - expected: '0.0420000000', found: '2.0830000000', error = '2.0410000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
348 KB |
3rd numbers differ - expected: '121.0000000000', found: '120.0180000000', error = '0.9820000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
33 ms |
892 KB |
3rd numbers differ - expected: '211.0000000000', found: '210.0110000000', error = '0.9890000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
92 ms |
1928 KB |
3rd numbers differ - expected: '15396.0000000000', found: '9489.3930000000', error = '5906.6070000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
185 ms |
3408 KB |
3rd numbers differ - expected: '7936.0000000000', found: '6084.6240000000', error = '1851.3760000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
206 ms |
3920 KB |
6th numbers differ - expected: '5053.0000000000', found: '5052.0000000000', error = '1.0000000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
257 ms |
5200 KB |
3rd numbers differ - expected: '1872.0000000000', found: '1871.0010000000', error = '0.9990000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
329 ms |
6232 KB |
3rd numbers differ - expected: '2960.0000000000', found: '2959.0010000000', error = '0.9990000000' |
2 |
Halted |
0 ms |
0 KB |
- |