Submission #767257

# Submission time Handle Problem Language Result Execution time Memory
767257 2023-06-26T14:39:17 Z Alora Balloons (CEOI11_bal) C++17
20 / 100
2000 ms 5492 KB
#include <bits/stdc++.h>
#define name "cownav"
#define fi(i,a,b) for(int i = a; i <= b; i++)
#define fid(i,a,b) for(int i = a; i >= b; i--)
#define ll long long
#define f first
#define se second
#define pii pair<int, int>
#define getbit(i, j) ((i >> j) & 1)
#define pb push_back
#define all(v) v.begin(), v.end()
#define maxn 200005
const int M = 1e9 + 7;
using namespace std;
int n, x[maxn];
double r[maxn];

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
 //   freopen(name".in", "r", stdin);
   // freopen(name".out", "w", stdout);
    cin >> n;
    fi(i, 1, n) cin >> x[i] >> r[i];
    fi(i, 2, n){
        fi(j, 1, i - 1){
            int A = (x[i] - x[j])*(x[i] - x[j]);
            double _r = A/(4*r[j]);
            r[i] = min(r[i], _r);
        }
    }
    fi(i, 1, n) cout << fixed << setprecision(3) << r[i] << '\n';

}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB 10 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 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 1 ms 340 KB 505 numbers
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 336 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 342 ms 1044 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 Incorrect 1965 ms 2132 KB 3rd numbers differ - expected: '15396.0000000000', found: '-8140.0230000000', error = '23536.0230000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2040 ms 2892 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2041 ms 3276 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2045 ms 4344 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2054 ms 5492 KB Time limit exceeded
2 Halted 0 ms 0 KB -