結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー |
![]() |
提出日時 | 2015-01-26 00:31:10 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 829 ms |
コンパイル使用メモリ | 112,808 KB |
実行使用メモリ | 5,756 KB |
最終ジャッジ日時 | 2024-06-12 02:05:41 |
合計ジャッジ時間 | 1,849 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
import std.stdio, std.conv, std.math, std.string, std.range, std.array,std.algorithm;void main(){readln();auto t = readln().strip().split().map!(to!int)().array().sort().uniq().array();auto u = t.dup[1..$];auto v = t[0..$-1];if(u.empty) {writeln("0");return;}u[] -= v[];u.reduce!min().writeln();}