Submission #837750

# Submission time Handle Problem Language Result Execution time Memory
837750 2023-08-25T15:41:33 Z Xiaoyang Balloons (CEOI11_bal) C++17
0 / 100
957 ms 1416 KB
#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
 
#define fi first
#define se second
#define pii pair<int,int>
#define pll pair<long long,long long>
#define pb push_back
#define debug(x) cerr<<#x<<"="<<x<<endl
#define pq priority_queue
#define inf 1ll<<60
#define rep(i,a,b) for (int i=a;i<(b);i++)
#define MP make_pair
#define SZ(x) (int(x.size()))
#define mod 1000000007
#define ALL(x) x.begin(),x.end()
#define endl "\n"
void inc(ll &a,ll b) {a=(a+b)%mod;}
void dec(ll &a,ll b) {a=(a-b+mod)%mod;}
int lowbit(ll x) {return x&(-x);}
 
 
vector<pair<ll,ll>>alist;
long double calc(ll a,ll b){
	return a*a/(4*b);
}
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	ll n;cin>>n;
	cout<<fixed<<setprecision(10);
	while(n--){
		long double x,r;cin>>x>>r;
		for(auto p:alist){
			r=min(r,calc(x-p.fi,p.se));
		}
		alist.pb(MP(x,r));
		cout<<r<<endl;
	}
	return 0;
}

# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 2nd numbers differ - expected: '4.1670000000', found: '4.0000000000', error = '0.1670000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 2nd numbers differ - expected: '252735385.4379999936', found: '252735385.0000000000', error = '0.4379999936'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 957 ms 1416 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 251 ms 1056 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 102 ms 880 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 15 ms 596 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 36 ms 672 KB Execution killed with signal 8
2 Halted 0 ms 0 KB -