結果

問題 No.182 新規性の虜
ユーザー testestesttestestest
提出日時 2015-08-08 17:09:54
言語 C90
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 228 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 23,980 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-25 07:05:49
合計ジャッジ時間 3,816 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 0 ms
4,376 KB
testcase_02 AC 0 ms
4,380 KB
testcase_03 AC 0 ms
4,380 KB
testcase_04 AC 0 ms
4,380 KB
testcase_05 AC 0 ms
4,376 KB
testcase_06 AC 0 ms
4,376 KB
testcase_07 AC 0 ms
4,380 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 0 ms
4,376 KB
testcase_15 AC 0 ms
4,376 KB
testcase_16 AC 0 ms
4,380 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 0 ms
4,380 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 1 ms
4,380 KB
evil01.txt RE -
evil02.txt RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 c(const void*a,const void*b){return*(int*)a-*(int*)b;}
 ^
main.c: In function ‘main’:
main.c:4:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 scanf("%d",&n);
 ^~~~~
main.c:4:1: warning: incompatible implicit declaration of built-in function ‘scanf’
main.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:1:
+#include <stdio.h>
 c(const void*a,const void*b){return*(int*)a-*(int*)b;}
main.c:4:1:
 scanf("%d",&n);
 ^~~~~
main.c:6:1: warning: implicit declaration of function ‘qsort’ [-Wimplicit-function-declaration]
 qsort(a+1,n,4,c);
 ^~~~~
main.c:8:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 printf("%d",i);
 ^~~~~~
main.c:8:1: warning: incompatible implicit declaration of built-in function ‘printf’
main.c:8:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

c(const void*a,const void*b){return*(int*)a-*(int*)b;}
int main(){
int n,i=0,a[10002]={};
scanf("%d",&n);
for(;i++<n;)scanf("%d",a+i);
qsort(a+1,n,4,c);
for(i=0;n--;)if(a[n]-a[n+1]&&a[n+1]-a[n+2])i++;
printf("%d",i);
return 0;
}
0