結果
| 問題 |
No.135 とりあえず1次元の問題
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-06 01:26:05 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 971 ms |
| コンパイル使用メモリ | 37,888 KB |
| 実行使用メモリ | 8,992 KB |
| 最終ジャッジ日時 | 2025-01-03 06:13:31 |
| 合計ジャッジ時間 | 31,450 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 TLE * 4 |
ソースコード
#include <stdio.h>
int main(){
int n,m,a[100000],s;
scanf("%d",&n);m=s=n;
while(s)scanf("%d",a+n-s--);
while(n--)for(s=0;s++-n;)a[s-1]>a[s]&&(a[s-1]^=a[s]^=a[s-1]^=a[s]);
while(--m)if(s=a[m]-a[m-1])n=!~n||s<n?s:n;
printf("%d",~n?n:0);
return 0;
}
testestest