結果
| 問題 |
No.135 とりあえず1次元の問題
|
| コンテスト | |
| ユーザー |
cowgirl
|
| 提出日時 | 2018-10-08 19:47:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 357 bytes |
| コンパイル時間 | 1,702 ms |
| コンパイル使用メモリ | 165,652 KB |
| 実行使用メモリ | 14,208 KB |
| 最終ジャッジ日時 | 2024-10-12 15:36:40 |
| 合計ジャッジ時間 | 14,158 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int minx=1000001;
int x[100010];
for(int i=0; i < n; i++) cin >> x[i];
for(int i=0; i < n; i++){
for(int j=0; j < n; j++){
if(x[i] == x[j]) continue;
minx = min(abs(x[i] - x[j]) , minx);
}
}
cout << minx << endl;
}
cowgirl