結果
問題 |
No.482 あなたの名は
|
ユーザー |
👑 ![]() |
提出日時 | 2017-02-12 16:46:43 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 131 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-29 16:50:52 |
合計ジャッジ時間 | 1,826 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 12 |
コンパイルメッセージ
main.c:1:15: warning: data definition has no type or storage class 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} | ^ main.c:1:15: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] main.c:1:17: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} | ^~~~ main.c: In function ‘main’: main.c:1:17: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:1:31: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} main.c:1:31: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} | ^~~~~ main.c:1:31: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:39: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 1 | long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");} | ~^ ~~~~~ | | | |
ソースコード
long a[1<<18];j;main(i){for(;~scanf("%d",a-i--)?:a[++j]?j-a[j]?i=a[j],a[j]^=a[i]^=a[j]^=a[i],~--*a:1:0;);j=!puts(*a&1?"NO":"YES");}