結果

問題 No.135 とりあえず1次元の問題
ユーザー diginatudiginatu
提出日時 2015-01-26 00:17:35
言語 D
(dmd 2.107.1)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 685 ms
コンパイル使用メモリ 101,508 KB
実行使用メモリ 5,824 KB
最終ジャッジ日時 2023-09-02 19:42:29
合計ジャッジ時間 1,987 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
5,824 KB
testcase_01 AC 1 ms
4,372 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 1 ms
4,368 KB
testcase_05 AC 2 ms
4,368 KB
testcase_06 AC 2 ms
4,372 KB
testcase_07 AC 1 ms
4,368 KB
testcase_08 AC 1 ms
4,372 KB
testcase_09 AC 2 ms
4,368 KB
testcase_10 AC 1 ms
4,368 KB
testcase_11 AC 1 ms
4,368 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,372 KB
testcase_15 AC 1 ms
4,368 KB
testcase_16 AC 2 ms
4,368 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 2 ms
4,368 KB
testcase_20 AC 2 ms
4,368 KB
testcase_21 AC 18 ms
5,672 KB
testcase_22 AC 32 ms
5,800 KB
evil01.txt AC 27 ms
5,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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[1..$];
  auto v = t[0..$-1];
  if(u.empty) {
    writeln("0");
    return;
  }
  u[] -= v[];
  u.reduce!min().writeln();
}
0