結果
問題 | No.482 あなたの名は |
ユーザー | kotatsugame |
提出日時 | 2017-02-13 01:18:37 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 190 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-09 11:34:32 |
合計ジャッジ時間 | 1,663 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 0 ms
5,376 KB |
testcase_08 | AC | 1 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 0 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 0 ms
5,376 KB |
testcase_13 | AC | 0 ms
5,376 KB |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 26 ms
5,376 KB |
testcase_16 | AC | 26 ms
5,376 KB |
testcase_17 | AC | 26 ms
5,376 KB |
testcase_18 | AC | 26 ms
5,376 KB |
testcase_19 | AC | 26 ms
5,376 KB |
testcase_20 | AC | 26 ms
5,376 KB |
testcase_21 | AC | 27 ms
5,376 KB |
testcase_22 | AC | 27 ms
5,376 KB |
testcase_23 | AC | 27 ms
5,376 KB |
testcase_24 | AC | 27 ms
5,376 KB |
testcase_25 | AC | 27 ms
5,376 KB |
testcase_26 | AC | 27 ms
5,376 KB |
testcase_27 | AC | 26 ms
5,376 KB |
testcase_28 | AC | 27 ms
5,376 KB |
testcase_29 | AC | 24 ms
5,376 KB |
testcase_30 | AC | 0 ms
5,376 KB |
コンパイルメッセージ
main.c:1:8: warning: data definition has no type or storage class 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^ main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^ main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int] 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^ main.c:1:21: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int] 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^ main.c:1:30: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^ main.c:1:73: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");} | ^~~~ main.c: In funct
ソースコード
long k;c,n,d[1<<18],u[1<<18];f(int v){u[v]?k-=c-1:(u[v]=1,c++,f(d[v]));}main(i){for(scanf("%d%ld",&n,&k);~scanf("%d",d+i++););for(i=0;i++<n;c=0)!u[i]&&f(i);return!puts(k<0||k%2?"NO":"YES");}