# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1125400 | yavuzskarahan | Balloons (CEOI11_bal) | C11 | 114 ms | 4380 KiB |
#include <stdio.h>
#include <math.h>
#define N 200005
int n, x[N];
double r[N];
int main() {
scanf("%d", &n);
int maksxi = 0;
long double maksx = 0;
for (int i = 1; i <= n; ++i) {
scanf("%d %lf", &x[i], &r[i]);
r[i] = fmin(r[i], fabs(x[i] - x[maksxi]) * fabs(x[i] - x[maksxi]) / (4 * r[maksxi]));
if (r[i] + x[i] > maksx) {
maksx = r[i] + x[i];
maksxi = i;
}
else if (r[i] + x[i] == maksx){
if (r[i] > r[maksxi]){
maksx = r[i] + x[i];
maksxi = i;
}
}
printf("%.4lf\n", r[i]);
}
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... |