結果
問題 | No.397 NO MORE KADOMATSU |
ユーザー | testestest |
提出日時 | 2016-07-15 22:43:53 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 296.39 |
最終ジャッジ日時 | 2024-07-16 10:35:50 |
合計ジャッジ時間 | 2,561 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 22 ms
25,220 KB |
testcase_01 | AC | 19 ms
25,220 KB |
testcase_02 | AC | 20 ms
24,580 KB |
testcase_03 | AC | 21 ms
25,220 KB |
testcase_04 | AC | 20 ms
24,580 KB |
testcase_05 | AC | 20 ms
24,580 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 18 ms
24,836 KB |
testcase_10 | WA | - |
testcase_11 | AC | 20 ms
25,220 KB |
testcase_12 | AC | 24 ms
25,220 KB |
testcase_13 | WA | - |
testcase_14 | AC | 29 ms
24,836 KB |
testcase_15 | WA | - |
testcase_16 | AC | 20 ms
24,952 KB |
testcase_17 | AC | 19 ms
24,952 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int] 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 1 | i,j,s,t,a[110],b[20000]; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main(n){ | ^~~~ main.c: In function ‘main’: main.c:2:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:3:13: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | for(scanf("%d",&n);i<n;i++)scanf("%d",a+i); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | i,j,s,t,a[110],b[20000]; main.c:3:13: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | for(scanf("%d",&n);i<n;i++)scanf("%d",a+i); | ^~~~~ main.c:3:13: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:11:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 11 | printf("%d\n",s/2); | ^~~~~~ main.c:11:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:11:9: warnin
ソースコード
i,j,s,t,a[110],b[20000]; main(n){ for(scanf("%d",&n);i<n;i++)scanf("%d",a+i); for(;n--;)for(j=1;a[j];j++)if(a[j-1]>a[j]){ b[s++]=j-1; b[s++]=j; t=a[j-1]; a[j-1]=a[j]; a[j]=t; } printf("%d\n",s/2); for(i=0;b[i];i+=2)printf("%d %d\n",b[i],b[i+1]); fflush(0); gets(&n); return 0; }