結果
問題 | No.1688 Veterinarian |
ユーザー | tails |
提出日時 | 2021-09-24 22:10:49 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 23 ms / 3,000 ms |
コード長 | 651 bytes |
コンパイル時間 | 456 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 10:41:09 |
合計ジャッジ時間 | 1,040 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
5,248 KB |
testcase_01 | AC | 22 ms
5,376 KB |
testcase_02 | AC | 7 ms
5,376 KB |
testcase_03 | AC | 3 ms
5,376 KB |
testcase_04 | AC | 2 ms
5,376 KB |
testcase_05 | AC | 2 ms
5,376 KB |
testcase_06 | AC | 23 ms
5,376 KB |
testcase_07 | AC | 3 ms
5,376 KB |
testcase_08 | AC | 22 ms
5,376 KB |
testcase_09 | AC | 22 ms
5,376 KB |
testcase_10 | AC | 16 ms
5,376 KB |
testcase_11 | AC | 11 ms
5,376 KB |
testcase_12 | AC | 3 ms
5,376 KB |
testcase_13 | AC | 13 ms
5,376 KB |
testcase_14 | AC | 5 ms
5,376 KB |
testcase_15 | AC | 21 ms
5,376 KB |
testcase_16 | AC | 5 ms
5,376 KB |
コンパイルメッセージ
main.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int] 9 | main(){ | ^~~~ main.c: In function 'main': main.c:10:17: warning: implicit declaration of function 'mmap' [-Wimplicit-function-declaration] 10 | char*rp=mmap(0l,1l<<25,1,2,0,0ll); | ^~~~ main.c:10:17: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] main.c:12:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 12 | scanf("%ld%ld%ld%ld",&a,&b,&c,&n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #pragma GCC optimize("Ofast") main.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 12 | scanf("%ld%ld%ld%ld",&a,&b,&c,&n); | ^~~~~ main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:32:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 32 | printf("%.8f %.8f %.8f",d[a][b][c],d[b][c][a],d[c][a][b]); | ^~~~~~ main.c:32:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:32:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:32:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rep(v,e) for(long v=0;v<e;++v) #define rrep3(v,s,e) for(long v=e;--v>=s;) double d[51][51][51]; main(){ char*rp=mmap(0l,1l<<25,1,2,0,0ll); long a,b,c,n; scanf("%ld%ld%ld%ld",&a,&b,&c,&n); rep(i,n){ rrep3(x,2,51){ double xx=x*(x-1); rrep3(y,1,51){ double yy=y*(y-1); rrep3(z,1,51){ double zz=z*(z-1); long s=x+y+z; double ss=s*(s-1); d[x][y][z]=( (1+d[x-1][y][z])*xx+ d[x][y-1][z]*yy+ d[x][y][z-1]*zz+ d[x][y][z]*(ss-(xx+yy+zz)) )/ss; } } } } printf("%.8f %.8f %.8f",d[a][b][c],d[b][c][a],d[c][a][b]); }