結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
![]() |
提出日時 | 2017-07-14 13:41:56 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 289 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 32,144 KB |
実行使用メモリ | 42,608 KB |
最終ジャッジ日時 | 2024-10-07 20:44:34 |
合計ジャッジ時間 | 2,322 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 13 WA * 9 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $N = trim(fgets(STDIN)); $X = explode(" ", trim(fgets(STDIN))); sort($X); $ans = 10000000; $small = $X[0]; for($i = 0; $i < $N; $i++) { $x = $X[$i]; if($x > $small) { $ans = min($ans, $x - $small); $small = $X[$i + 1]; } } if($ans == 10000000) $ans = 0; print($ans); ?>