結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー | yoza |
提出日時 | 2015-02-26 18:05:02 |
言語 | Nim (2.0.2) |
結果 |
TLE
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 3,183 ms |
コンパイル使用メモリ | 68,824 KB |
実行使用メモリ | 16,060 KB |
最終ジャッジ日時 | 2023-09-11 07:51:27 |
合計ジャッジ時間 | 26,911 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | AC | 2 ms
4,376 KB |
testcase_02 | RE | - |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | AC | 2 ms
4,376 KB |
testcase_13 | AC | 2 ms
4,504 KB |
testcase_14 | AC | 2 ms
4,376 KB |
testcase_15 | AC | 2 ms
4,376 KB |
testcase_16 | RE | - |
testcase_17 | AC | 2 ms
4,380 KB |
testcase_18 | AC | 2 ms
4,376 KB |
testcase_19 | AC | 3 ms
4,380 KB |
testcase_20 | AC | 2 ms
4,376 KB |
testcase_21 | RE | - |
testcase_22 | TLE | - |
evil01.txt | TLE | - |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import strutils, sequtils, algorithm, math var n = readLine(stdin).parseInt x_seq = split(readLine(stdin), ' ').map(parseInt) min_v = high(int) x_seq.sort(cmp[int]) x_seq = x_seq.deduplicate() if x_seq.len() == 1: min_v = 0 else: for i in countup(0, n - 2): min_v = min(min_v, abs(x_seq[i] - x_seq[i + 1])) echo(min_v)