結果
問題 | No.461 三角形はいくつ? |
ユーザー | tails |
提出日時 | 2016-12-12 00:42:30 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 834 bytes |
コンパイル時間 | 287 ms |
コンパイル使用メモリ | 23,168 KB |
実行使用メモリ | 13,888 KB |
最終ジャッジ日時 | 2024-05-06 18:59:10 |
合計ジャッジ時間 | 23,797 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,784 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 0 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 2 ms
5,376 KB |
testcase_05 | TLE | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n;c[3]; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] main.c:1:3: warning: data definition has no type or storage class 1 | n;c[3]; | ^ main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] main.c:3:1: warning: data definition has no type or storage class 3 | i;j;k;p; | ^ main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:3:3: warning: data definition has no type or storage class 3 | i;j;k;p; | ^ main.c:3:3: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] main.c:3:5: warning: data definition has no type or storage class 3 | i;j;k;p; | ^ main.c:3:5: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int] main.c:3:7: warning: data definition has no type or storage class 3 | i;j;k;p; | ^ main.c:3:7: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] main.c:4:1: warning: data definition has no type or storage class 4 | r; | ^ main.c:4:1: warning: type defaults to ‘int’ in declaration of ‘r’ [-Wimplicit-int] main.c:7:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 7 | main(){ | ^~~~ main.c: In function ‘main’: main.c:8:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 8 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | n;c[3]; main.c:8:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 8 | scanf("%d",&n); | ^~~~~ main.c:8:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:42:51: warning: implicit decla
ソースコード
n;c[3]; double d[3][5000],a,b; i;j;k;p; r; double e=1e-8; main(){ scanf("%d",&n); r=n+1; for(i=0;i<n;++i){ scanf("%d%lf%lf",&p,&a,&b); d[p][c[p]++]=a/(a+b); } for(i=0;i<c[0];++i){ for(j=0;j<c[1];++j){ if(d[0][i]+d[1][j]>1+e){ //printf("0=%d 1=%d\n",i,j); ++r; } } } for(i=0;i<c[0];++i){ for(j=0;j<c[2];++j){ if(d[0][i]+d[2][j]>1+e){ //printf("0=%d 2=%d\n",i,j); ++r; } } } for(i=0;i<c[1];++i){ for(j=0;j<c[2];++j){ if(d[1][i]+d[2][j]>1+e){ //printf("1=%d 2=%d\n",i,j); ++r; } } } for(i=0;i<c[0];++i){ for(j=0;j<c[1];++j){ for(k=0;k<c[2];++k){ if(d[0][i]+d[1][j]>1-e && d[0][i]+d[2][k]>1-e && d[1][j]+d[2][k]>1-e &&fabs(d[0][i]+d[1][j]+d[2][k]-2)>e){ //printf("0=%d 1=%d 2=%d\n",i,j,k); ++r; } } } } printf("%d",r); return 0; }