結果

問題 No.482 あなたの名は
ユーザー kotatsugamekotatsugame
提出日時 2017-02-13 01:25:16
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 174 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 23,840 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-28 14:59:49
合計ジャッジ時間 1,949 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 0 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 0 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 0 ms
4,376 KB
testcase_14 AC 0 ms
4,376 KB
testcase_15 AC 25 ms
4,380 KB
testcase_16 AC 25 ms
4,380 KB
testcase_17 AC 25 ms
4,376 KB
testcase_18 AC 25 ms
4,376 KB
testcase_19 AC 25 ms
4,380 KB
testcase_20 AC 26 ms
4,376 KB
testcase_21 AC 25 ms
4,376 KB
testcase_22 AC 25 ms
4,380 KB
testcase_23 AC 25 ms
4,380 KB
testcase_24 AC 25 ms
4,380 KB
testcase_25 AC 25 ms
4,376 KB
testcase_26 WA -
testcase_27 AC 25 ms
4,380 KB
testcase_28 AC 25 ms
4,380 KB
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
 ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
   ^
main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
     ^
main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
       ^
main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
                ^
main.c:1:25: warning: return type defaults to ‘int’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
                         ^
main.c: In function ‘f’:
main.c:1:25: warning: type of ‘v’ defaults to ‘int’ [-Wimplicit-int]
main.c: At top level:
main.c:1:62: warning: return type defaults to ‘int’ [-Wimplicit-int]
 k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf

ソースコード

diff #

k,c,n,d[1<<18],u[1<<18];f(v){u[v]?k-=c-1:(u[v]=++c,f(d[v]));}main(i){for(scanf("%d%d",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);n=!puts(k<0||k%2?"NO":"YES");}
0