Submission #1006032

# Submission time Handle Problem Language Result Execution time Memory
1006032 2024-06-23T10:28:00 Z Mubaris Balloons (CEOI11_bal) C++17
20 / 100
2000 ms 7052 KB
#include<bits/stdc++.h>
using namespace std;
double f(int a,int b,double c,double d){
    int dist=(b-a)*(b-a);
    double ans=(double)dist/4;ans=(double)ans/d;
    return (ans<c?ans:c);
}
void solve(){
    int a;cin>>a;
    vector<double> b(a),c(a);
    for(int i=0;i<a;i++) cin>>b[i]>>c[i];
    for(int i=0;i<a;i++){
        stack<int> st;
        for(int j=0;j<i;j++) st.push(j);
        while(!st.empty()) {c[i]=f(b[i],b[st.top()],c[i],c[st.top()]);st.pop();}
        cout<<fixed<<setprecision(3)<<c[i]<<endl;
    }
}
int main(){
    int t=1;
    while(t--)	solve();
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB 10 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 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 Correct 2 ms 348 KB 505 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 348 KB 216th numbers differ - expected: '204.7450000000', found: '-4362157.0549999997', error = '4362361.7999999998'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 726 ms 1536 KB 203rd numbers differ - expected: '482.0130000000', found: '-2497845.7940000002', error = '2498327.8070000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2041 ms 2432 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2043 ms 3888 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2027 ms 4396 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2073 ms 5460 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2066 ms 7052 KB Time limit exceeded
2 Halted 0 ms 0 KB -