結果

問題 No.519 アイドルユニット
ユーザー cielciel
提出日時 2017-05-29 21:41:14
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 294 bytes
コンパイル時間 688 ms
コンパイル使用メモリ 29,888 KB
実行使用メモリ 26,932 KB
最終ジャッジ日時 2023-10-21 16:57:42
合計ジャッジ時間 5,416 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
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 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | r[1<<24];main(){
      | ^
main.c:1:1: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:1:10: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | r[1<<24];main(){
      |          ^~~~
main.c: In function 'main':
main.c:3:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | r[1<<24];main(){
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%d",&n);
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |         printf("%d\n",r[(1<<n)-1]);
      |         ^~~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'

ソースコード

diff #

r[1<<24];main(){
	int m[24][24],n,i,j,k,t,s;
	scanf("%d",&n);
	for(i=0;i<n;i++)for(j=0;j<n;j++)scanf("%d",m[i]+j);
	for(i=0;i<1<<n;i++)if(!__builtin_parity(i))for(j=0;j<n;j++)if(!(i&1<<j))for(k=0;k<n;k++)if(!(i&1<<k))if(t=i|1<<j|1<<k,s=r[i]+m[j][k],r[t]<s)r[t]=s;
	printf("%d\n",r[(1<<n)-1]);
}
0