結果

問題 No.135 とりあえず1次元の問題
ユーザー 👑 testestest
提出日時 2015-08-06 03:01:59
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 37,504 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-01-03 06:14:30
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
int c(const void*a,const void*b){return*(int*)a-*(int*)b;}
int main(){
int m,a[1<<17],s=0,n=0;scanf("%d",&m);
while(s<m)scanf("%d",a+s++);qsort(a,m,4,c);
while(--m)if(s=a[m]-a[m-1])n=!n||s<n?s:n;printf("%d",n);
return 0;
}
0