結果
問題 | No.482 あなたの名は |
ユーザー | testestest |
提出日時 | 2017-02-12 16:53:45 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 188 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 23,564 KB |
実行使用メモリ | 4,568 KB |
最終ジャッジ日時 | 2023-08-28 14:51:48 |
合計ジャッジ時間 | 1,696 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 0 ms
4,380 KB |
testcase_04 | WA | - |
testcase_05 | AC | 1 ms
4,376 KB |
testcase_06 | WA | - |
testcase_07 | AC | 0 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | AC | 0 ms
4,376 KB |
testcase_10 | AC | 1 ms
4,380 KB |
testcase_11 | WA | - |
testcase_12 | AC | 0 ms
4,376 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 23 ms
4,376 KB |
testcase_17 | AC | 23 ms
4,380 KB |
testcase_18 | AC | 23 ms
4,376 KB |
testcase_19 | WA | - |
testcase_20 | AC | 23 ms
4,380 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 22 ms
4,376 KB |
testcase_27 | AC | 23 ms
4,380 KB |
testcase_28 | WA | - |
testcase_29 | AC | 21 ms
4,380 KB |
testcase_30 | AC | 1 ms
4,376 KB |
コンパイルメッセージ
main.c:1:15: warning: data definition has no type or storage class long a[1<<18];i,j,n,k; ^ main.c:1:15: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:1:17: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] long a[1<<18];i,j,n,k; ^ main.c:1:19: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] long a[1<<18];i,j,n,k; ^ main.c:1:21: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int] long a[1<<18];i,j,n,k; ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main(){ ^~~~ main.c: In function ‘main’: main.c:3:2: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] scanf("%d%d",&n,&k); ^~~~~ main.c:3:2: warning: incompatible implicit declaration of built-in function ‘scanf’ main.c:3:2: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:1: +#include <stdio.h> long a[1<<18];i,j,n,k; main.c:3:2: scanf("%d%d",&n,&k); ^~~~~ main.c:10:5: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration] j=!puts(k&1?"NO":"YES"); ^~~~
ソースコード
long a[1<<18];i,j,n,k; main(){ scanf("%d%d",&n,&k); for(i=1;i<=n;i++)scanf("%d",a+i); for(j=1;j<=n&&k>=0;j++)if(a[j]!=j){ i=a[j]; a[j]=a[i]; a[i]=i; } j=!puts(k&1?"NO":"YES"); }