結果

問題 No.198 キャンディー・ボックス2
ユーザー testestesttestestest
提出日時 2016-02-18 05:11:40
言語 C90
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 175 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 19,840 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-28 01:45:54
合計ジャッジ時間 1,004 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 0 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 0 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 0 ms
6,940 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 0 ms
6,940 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 0 ms
6,944 KB
testcase_12 AC 1 ms
6,940 KB
testcase_13 AC 0 ms
6,940 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 0 ms
6,944 KB
testcase_17 AC 1 ms
6,944 KB
testcase_18 AC 0 ms
6,944 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 AC 1 ms
6,940 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 AC 1 ms
6,944 KB
testcase_23 AC 0 ms
6,944 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:10: warning: data definition has no type or storage class
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |          ^
main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |            ^
main.c:1:17: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |                 ^
main.c:1:22: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |                      ^
main.c:1:46: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |                                              ^~~~
main.c: In function ‘main’:
main.c:1:46: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    1 | long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
      |                                   

ソースコード

diff #

long s,q;x,j=-2,a[9];c(int*a,int*b){x=*a-*b;}main(i){for(;~scanf("%d",a+j);q+=++j?a[j-1]:0);qsort(a,j,4,c);i=a[j/2];q/=j;for(q<i?i=q:0;j--;s+=abs(a[j]-i));j=!printf("%ld",s);}
0