結果
| 問題 |
No.135 とりあえず1次元の問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-04 11:32:16 |
| 言語 | Haskell (9.10.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 259 bytes |
| コンパイル時間 | 8,088 ms |
| コンパイル使用メモリ | 173,972 KB |
| 実行使用メモリ | 47,004 KB |
| 最終ジャッジ日時 | 2024-06-11 06:47:35 |
| 合計ジャッジ時間 | 20,209 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 21 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:7:1: warning: [GHC-94817] [-Wtabs]
Tab character found here, and in six further locations.
Suggested fix: Please use spaces instead.
|
7 | n <- getLine
| ^^^^^^^^
[2 of 2] Linking a.out
ソースコード
import Data.List dif f (x:y:[]) = [f x y] dif f (x:y:xs) = (f x y) : (dif f (y:xs)) main = do n <- getLine p <- getLine >>= return . nub . sort . map (read::String->Int) . words print $ if length p == 0 then 0 else minimum $ dif (\x y -> abs (x-y)) p