結果
| 問題 | No.411 昇順昇順ソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-11 01:33:19 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 150 bytes |
| 記録 | |
| コンパイル時間 | 173 ms |
| コンパイル使用メモリ | 29,636 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-08 16:13:19 |
| 合計ジャッジ時間 | 1,067 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 30 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
| ^
main.c:1:3: warning: data definition has no type or storage class
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
| ^
main.c:1:5: warning: data definition has no type or storage class
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
| ^
main.c: In function ‘main’:
main.c:1:17: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
main.c:1:135: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}
| ^~~~~~
main.c:1:135: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
i;c;j;main(n,k){scanf("%d%d",&n,&k);for(i=1<<n,--i;--i;){for(j=n;!(i&(1<<--j)););!(i&(1<<k-1)-1)&&i&(1<<k-1)&&((~i)&((1<<j)-1))&&++c;}printf("%d",c);}