結果
問題 |
No.366 ロボットソート
|
ユーザー |
👑 ![]() |
提出日時 | 2016-06-30 19:55:55 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 167 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 18:29:02 |
合計ジャッジ時間 | 1,097 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | x[1010],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:9: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | x[1010],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:11: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | x[1010],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:13: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | x[1010],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:13: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:1:27: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | x[1010],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[1010],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:27: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin
ソースコード
x[1010],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);}