제출 #1125400

#제출 시각아이디문제언어결과실행 시간메모리
1125400yavuzskarahanBalloons (CEOI11_bal)C11
20 / 100
114 ms4380 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) 메시지

bal.c: In function 'main':
bal.c:11:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d", &n);
      |     ^~~~~~~~~~~~~~~
bal.c:17:9: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |         scanf("%d %lf", &x[i], &r[i]);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...