結果
問題 | No.553 AlphaCoder Rating |
ユーザー |
![]() |
提出日時 | 2019-08-14 20:34:55 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,500 ms |
コード長 | 806 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 14:34:09 |
合計ジャッジ時間 | 1,197 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
コンパイルメッセージ
main.c: In function 'in': main.c:9:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration] 9 | #define gc() getchar_unlocked() | ^~~~~~~~~~~~~~~~ main.c:15:24: note: in expansion of macro 'gc' 15 | int n = 0, c = gc(); | ^~
ソースコード
// yukicoder: No.553 AlphaCoder Rating// bal4u 2019.8.14#include <stdio.h>#include <math.h>//// 入出力関係#if 1#define gc() getchar_unlocked()#else#define gc() getchar()#endifint in() { // 非負整数の入力int n = 0, c = gc();do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');return n;}double f(int n) {return 1200.*(sqrt(1-pow(0.81, n)) / (1-pow(0.9, n))-1) /3.3588989435406735522369819838596; // (sqrt(19)-1)}int N;int RPerf[102];int main(){int i; double x, y;N = in();for (i = 1; i <= N; i++) RPerf[i] = in();y = 0;for (i = 1; i <= N; i++) {y += pow(2, RPerf[i]/800.0) * pow(0.9, i);}y /= 9.0*(1 - pow(0.9, N));x = 800*log10(y)/0.30102999566398119521373889472449; // log10(2)printf("%d\n", (int)(x-f(N) + 0.5));return 0;}