# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
837753 |
2023-08-25T15:43:22 Z |
Xiaoyang |
Balloons (CEOI11_bal) |
C++17 |
|
2000 ms |
8636 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<long double,long double>>alist;
long double calc(ll a,ll b){
long double dd=(alist[b].fi-alist[a].fi)*(alist[b].fi-alist[a].fi);
long double r= (dd*1.0)/(4*alist[a].se);
return r;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;cin>>n;
rep(i,0,n){
long double x,r;cin>>x>>r;
alist.pb(MP(x,r));
}
vector<long double>ans;
rep(i,0,n){
long double r=alist[i].se;
rep(j,0,i){
r=min(r,calc(j,i));
}
ans.pb(r);
}
cout<<fixed<<" "<<setprecision(10);
for(auto x:ans)cout<<x<<" ";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
5th numbers differ - expected: '17.1630000000', found: '4.3706896552', error = '12.7923103448' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
5th numbers differ - expected: '0.1170000000', found: '0.0833333333', error = '0.0336666667' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
492 KB |
3rd numbers differ - expected: '121.0000000000', found: '120.0182926829', error = '0.9817073171' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
771 ms |
2036 KB |
3rd numbers differ - expected: '211.0000000000', found: '210.0105633803', error = '0.9894366197' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2058 ms |
2776 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2073 ms |
4984 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2052 ms |
4956 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2063 ms |
8636 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2079 ms |
8580 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |