結果
問題 | No.461 三角形はいくつ? |
ユーザー | tails |
提出日時 | 2016-12-12 03:05:32 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,262 bytes |
コンパイル時間 | 818 ms |
コンパイル使用メモリ | 22,112 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 13:48:03 |
合計ジャッジ時間 | 73,316 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,248 KB |
testcase_02 | AC | 0 ms
5,248 KB |
testcase_03 | AC | 0 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 3,599 ms
5,248 KB |
testcase_06 | AC | 1,531 ms
5,248 KB |
testcase_07 | AC | 1,844 ms
5,248 KB |
testcase_08 | AC | 1,020 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 164 ms
5,248 KB |
testcase_11 | AC | 2,350 ms
5,248 KB |
testcase_12 | AC | 633 ms
5,248 KB |
testcase_13 | AC | 4,482 ms
5,248 KB |
testcase_14 | AC | 4,217 ms
5,248 KB |
testcase_15 | AC | 4,509 ms
5,248 KB |
testcase_16 | AC | 11 ms
5,248 KB |
testcase_17 | AC | 11 ms
5,248 KB |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | AC | 4,430 ms
5,248 KB |
testcase_21 | AC | 4,421 ms
5,248 KB |
testcase_22 | AC | 4,324 ms
5,248 KB |
testcase_23 | AC | 423 ms
5,248 KB |
testcase_24 | AC | 346 ms
5,248 KB |
testcase_25 | AC | 19 ms
5,248 KB |
testcase_26 | AC | 18 ms
5,248 KB |
testcase_27 | AC | 6 ms
5,248 KB |
testcase_28 | AC | 7 ms
5,248 KB |
testcase_29 | AC | 1,654 ms
5,248 KB |
testcase_30 | AC | 812 ms
5,248 KB |
testcase_31 | AC | 2,956 ms
5,248 KB |
testcase_32 | AC | 3,738 ms
5,248 KB |
testcase_33 | AC | 2 ms
5,248 KB |
testcase_34 | AC | 2 ms
5,248 KB |
testcase_35 | AC | 1 ms
5,248 KB |
testcase_36 | AC | 970 ms
5,248 KB |
testcase_37 | AC | 844 ms
5,248 KB |
testcase_38 | AC | 908 ms
5,248 KB |
testcase_39 | AC | 722 ms
5,248 KB |
testcase_40 | AC | 899 ms
5,248 KB |
testcase_41 | AC | 898 ms
5,248 KB |
testcase_42 | AC | 2,554 ms
5,248 KB |
testcase_43 | AC | 2,604 ms
5,248 KB |
testcase_44 | AC | 2,456 ms
5,248 KB |
コンパイルメッセージ
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:2:1: warning: data definition has no type or storage class 2 | da[3][5000],dd[3][5000]; | ^~ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘da’ [-Wimplicit-int] main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘dd’ [-Wimplicit-int] 2 | da[3][5000],dd[3][5000]; | ^~ main.c:3:1: warning: data definition has no type or storage class 3 | a,b;i;j;k;p; | ^ main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:3:3: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 3 | a,b;i;j;k;p; | ^ main.c:3:5: warning: data definition has no type or storage class 3 | a,b;i;j;k;p; | ^ main.c:3:5: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:3:7: warning: data definition has no type or storage class 3 | a,b;i;j;k;p; | ^ main.c:3:7: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] main.c:3:9: warning: data definition has no type or storage class 3 | a,b;i;j;k;p; | ^ main.c:3:9: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int] main.c:3:11: warning: data definition has no type or storage class 3 | a,b;i;j;k;p; | ^ main.c:3:11: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] main.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 6 | main(){ | ^~~~ main.c: In function ‘main’: main.c:7:9: warning: implicit declaration of function
ソースコード
n;c[3]; da[3][5000],dd[3][5000]; a,b;i;j;k;p; long long r; main(){ scanf("%d",&n); r=n+1; for(i=0;i<n;++i){ scanf("%d%d%d",&p,&a,&b); da[p][c[p]]=a; dd[p][c[p]]=a+b; ++c[p]; } for(i=0;i<c[0];++i){ for(j=0;j<c[1];++j){ if((long long)da[0][i]*dd[1][j]+(long long)dd[0][i]*da[1][j]>(long long)dd[0][i]*dd[1][j]){ ++r; } } } for(i=0;i<c[0];++i){ for(j=0;j<c[2];++j){ if((long long)da[0][i]*dd[2][j]+(long long)dd[0][i]*da[2][j]>(long long)dd[0][i]*dd[2][j]){ ++r; } } } for(i=0;i<c[1];++i){ for(j=0;j<c[2];++j){ if((long long)da[1][i]*dd[2][j]+(long long)dd[1][i]*da[2][j]>(long long)dd[1][i]*dd[2][j]){ ++r; } } } for(i=0;i<c[0];++i){ long long da0=da[0][i]; long long dd0=dd[0][i]; for(j=0;j<c[1];++j){ long long da1=da[1][j]; long long dd1=dd[1][j]; if(da0*dd1+dd0*da1>=dd0*dd1){ long long dam,ddm; if(da0*dd1<dd0*da1){ dam=da0; ddm=dd0; }else{ dam=da1; ddm=dd1; } long long das=da0*dd1+dd0*da1; long long dds=dd0*dd1; das-=2*dds; for(k=0;k<c[2];++k){ long long da2=da[2][k]; long long dd2=dd[2][k]; if(dam*dd2+da2*ddm>=ddm*dd2 && das*dd2+da2*dds!=0){ ++r; } } } } } printf("%lld",r); return 0; }