結果
問題 |
No.366 ロボットソート
|
ユーザー |
👑 ![]() |
提出日時 | 2016-06-30 19:57:16 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 166 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 23:16:06 |
合計ジャッジ時間 | 1,408 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 RE * 2 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} | ^ main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} | ^ main.c:1:12: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} | ^~~~ main.c: In function ‘main’: main.c:1:12: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:1:26: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);} main.c:1:26: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declarati
ソースコード
x[999],s,j;main(i){for(;~scanf("%d",x-i);i--);for(;~++i&&~s;x[-i]<x[~i]?s=-1:0)for(j=1+*x;x[j];j++)x[j-*x]>x[j]?x[j-*x]^=x[j]^=x[j-*x]^=x[j],s++:0;s=!printf("%d",s);}