Submission #403047

# Submission time Handle Problem Language Result Execution time Memory
403047 2021-05-12T17:16:35 Z SirCovidThe19th Balloons (CEOI11_bal) C++14
0 / 100
746 ms 4576 KB
#include <bits/stdc++.h>
using namespace std;

int main(){
    
    int n; cin >> n;
    //pos, rad
    stack<pair<int, int>> stack;
    for (int i = 0; i < n; i++){
        long double loc, sz; cin >> loc >> sz;
        while (!stack.empty()){
            sz = min(sz, (loc*loc)/(4*stack.top().second));
            if (sz >= stack.top().second) stack.pop();
            else break;
        }
        stack.push({loc, sz});
        cout<<fixed<<setprecision(3)<<sz<<endl;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 2nd numbers differ - expected: '4.1670000000', found: '7.0000000000', error = '2.8330000000'
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 280 KB 2nd numbers differ - expected: '252735385.4379999936', found: '1000000000.0000000000', error = '747264614.5620000362'
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 204 KB 2nd numbers differ - expected: '0.0010000000', found: '0.0050000000', error = '0.0040000000'
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 344 KB 3rd numbers differ - expected: '121.0000000000', found: '123.0000000000', error = '2.0000000000'
# Verdict Execution time Memory Grader output
1 Incorrect 77 ms 660 KB 3rd numbers differ - expected: '211.0000000000', found: '213.0000000000', error = '2.0000000000'
# Verdict Execution time Memory Grader output
1 Incorrect 208 ms 1432 KB 5th numbers differ - expected: '15395.0000000000', found: '15396.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 373 ms 2576 KB 3rd numbers differ - expected: '7936.0000000000', found: '10352.0000000000', error = '2416.0000000000'
# Verdict Execution time Memory Grader output
1 Incorrect 473 ms 3016 KB 5th numbers differ - expected: '5054.0000000000', found: '5055.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 601 ms 3968 KB 3rd numbers differ - expected: '1872.0000000000', found: '1874.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 746 ms 4576 KB 3rd numbers differ - expected: '2960.0000000000', found: '2962.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -