# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1167249 | M0stafa | Balloons (CEOI11_bal) | C++20 | 1277 ms | 2208 KiB |
#include <iostream>
#include <vector>
using namespace std;
vector<pair<long double, long double>> curr;
int n;
long double findval(int pos, long double x) {
return (curr[pos].first - x) * (curr[pos].first - x) / 4.0 / curr[pos].second;
}
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
long double x, rad;
scanf("%Lf %Lf", &x, &rad);
for (int j = 0; j < curr.size(); j++) {
rad = min(rad, findval(j, x));
}
while (curr.size() > 0 && rad + (long double)1e-18 > curr.back().second) {
curr.pop_back();
}
curr.push_back(make_pair(x, rad));
printf("%.3Lf\n", rad);
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |