結果
問題 | No.330 Eigenvalue Decomposition |
ユーザー | rickytheta |
提出日時 | 2015-12-23 12:58:12 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 21,760 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-18 21:43:20 |
合計ジャッジ時間 | 1,517 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 1 ms
5,376 KB |
testcase_28 | AC | 0 ms
5,376 KB |
testcase_29 | AC | 1 ms
5,376 KB |
testcase_30 | AC | 0 ms
5,376 KB |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | d[100010],i; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int] main.c:2:11: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 2 | d[100010],i; | ^ main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | r(x){ | ^ main.c: In function ‘r’: main.c:3:1: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int] main.c: At top level: main.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 6 | main(n,m,a,b,c){ | ^~~~ main.c: In function ‘main’: main.c:6:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:6:1: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c:6:1: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int] main.c:6:1: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int] main.c:6:1: warning: type of ‘c’ defaults to ‘int’ [-Wimplicit-int] main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d",&n,&m); | ^~~~~~~~~~~~~~~~~~~ main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d%d%d",&a,&b,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> d[100010],i; r(x){ i=d[x]<0?x:(d[x]=r(d[x])); } main(n,m,a,b,c){ scanf("%d%d",&n,&m); for(i=n;i--;)d[i]=-1; for(;m--;){ scanf("%d%d%d",&a,&b,&c); a=r(a-1);b=r(b-1); if(a-b)d[a]+=d[b],d[b]=a,--n; } i=!printf("%d\n",n); }