結果
問題 | No.519 アイドルユニット |
ユーザー | tails |
提出日時 | 2017-05-28 22:51:37 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 562 ms / 1,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 1,309 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 67,440 KB |
最終ジャッジ日時 | 2024-10-03 03:50:31 |
合計ジャッジ時間 | 5,939 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 562 ms
67,212 KB |
testcase_01 | AC | 552 ms
67,216 KB |
testcase_02 | AC | 133 ms
19,280 KB |
testcase_03 | AC | 9 ms
6,820 KB |
testcase_04 | AC | 1 ms
6,816 KB |
testcase_05 | AC | 1 ms
6,816 KB |
testcase_06 | AC | 1 ms
6,816 KB |
testcase_07 | AC | 1 ms
6,816 KB |
testcase_08 | AC | 1 ms
6,820 KB |
testcase_09 | AC | 1 ms
6,820 KB |
testcase_10 | AC | 3 ms
6,816 KB |
testcase_11 | AC | 9 ms
6,820 KB |
testcase_12 | AC | 1 ms
6,816 KB |
testcase_13 | AC | 9 ms
6,816 KB |
testcase_14 | AC | 9 ms
6,820 KB |
testcase_15 | AC | 9 ms
6,816 KB |
testcase_16 | AC | 10 ms
6,816 KB |
testcase_17 | AC | 9 ms
6,816 KB |
testcase_18 | AC | 9 ms
6,816 KB |
testcase_19 | AC | 9 ms
6,816 KB |
testcase_20 | AC | 10 ms
6,816 KB |
testcase_21 | AC | 9 ms
6,820 KB |
testcase_22 | AC | 9 ms
6,820 KB |
testcase_23 | AC | 9 ms
6,820 KB |
testcase_24 | AC | 32 ms
6,816 KB |
testcase_25 | AC | 33 ms
6,816 KB |
testcase_26 | AC | 34 ms
7,004 KB |
testcase_27 | AC | 33 ms
7,616 KB |
testcase_28 | AC | 33 ms
6,816 KB |
testcase_29 | AC | 552 ms
67,244 KB |
testcase_30 | AC | 549 ms
67,324 KB |
testcase_31 | AC | 549 ms
67,432 KB |
testcase_32 | AC | 548 ms
67,440 KB |
testcase_33 | AC | 1 ms
6,820 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | f[24][24]; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'f' [-Wimplicit-int] main.c:2:1: warning: data definition has no type or storage class 2 | g[1<<24]; | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'g' [-Wimplicit-int] main.c:3:1: warning: data definition has no type or storage class 3 | b,d,i,j,k,n; | ^ main.c:3:1: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:3:3: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] 3 | b,d,i,j,k,n; | ^ main.c:3:5: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 3 | b,d,i,j,k,n; | ^ main.c:3:7: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] 3 | b,d,i,j,k,n; | ^ main.c:3:9: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] 3 | b,d,i,j,k,n; | ^ main.c:3:11: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] 3 | b,d,i,j,k,n; | ^ main.c:4:1: warning: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:5:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | f[24][24]; main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 5 | scanf("%d",&n); | ^~~~~ main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:25:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 25 | printf("%d",g[(1<<n)-1]); | ^~~~~~ main.c:25:9: note: include '<stdio.h>' or provide a declarati
ソースコード
f[24][24]; g[1<<24]; b,d,i,j,k,n; main(){ scanf("%d",&n); for(j=0;j<n;++j){ for(i=0;i<n;++i){ scanf("%d",&f[j][i]); } } for(k=1;k<1<<n;++k){ if(!__builtin_parity(k)){ b=0; j=0; while(!(k&1<<j))++j; for(i=j+1;i<n;++i){ if(k&1<<i){ d=g[k^1<<j^1<<i]+f[j][i]; if(b<d)b=d; } } g[k]=b; } } printf("%d",g[(1<<n)-1]); }