# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1006791 |
2024-06-24T08:50:20 Z |
jor0715 |
Balloons (CEOI11_bal) |
C++17 |
|
2000 ms |
4440 KB |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define endl "\n"
#define range(i,a,b,c) for(int i=a;i!=b;i+=c)
#define vi vector<int>
#define vll vector<ll>
long double r2(int r1, int x1, int x2){
int dis = abs(x2-x1);
return 1.0*pow(dis,2)/(4*r1);
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout << fixed << setprecision(3);
int N;
cin >> N;
vi x(N);
vi r(N);
range(i,0,N,1){
cin >> x[i] >> r[i];
}
range(i,0,N,1){
long double minn = r[i];
range(j,0,i,1){
minn = min(minn, r2(r[j], x[j], x[i]));
}
cout << minn << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
604 KB |
5th numbers differ - expected: '17.1630000000', found: '4.3710000000', error = '12.7920000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
2 numbers |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
5th numbers differ - expected: '0.1170000000', found: '0.0830000000', error = '0.0340000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
348 KB |
3rd numbers differ - expected: '121.0000000000', found: '120.0180000000', error = '0.9820000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1027 ms |
860 KB |
3rd numbers differ - expected: '211.0000000000', found: '210.0110000000', error = '0.9890000000' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2054 ms |
1620 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2067 ms |
2900 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2061 ms |
2908 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2044 ms |
3924 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2055 ms |
4440 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |