結果

問題 No.406 鴨等間隔の法則
ユーザー pekempeypekempey
提出日時 2016-08-11 03:45:05
言語 Haskell
(9.8.2)
結果
AC  
実行時間 562 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 715 ms
コンパイル使用メモリ 158,444 KB
実行使用メモリ 47,360 KB
最終ジャッジ日時 2023-09-21 18:01:03
合計ジャッジ時間 10,550 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 192 ms
25,784 KB
testcase_01 AC 3 ms
7,348 KB
testcase_02 AC 2 ms
7,272 KB
testcase_03 AC 3 ms
7,244 KB
testcase_04 AC 462 ms
41,496 KB
testcase_05 AC 142 ms
23,768 KB
testcase_06 AC 152 ms
23,896 KB
testcase_07 AC 162 ms
23,964 KB
testcase_08 AC 463 ms
40,620 KB
testcase_09 AC 532 ms
45,332 KB
testcase_10 AC 192 ms
25,872 KB
testcase_11 AC 413 ms
40,028 KB
testcase_12 AC 282 ms
34,436 KB
testcase_13 AC 252 ms
34,100 KB
testcase_14 AC 443 ms
40,620 KB
testcase_15 AC 22 ms
13,520 KB
testcase_16 AC 43 ms
14,304 KB
testcase_17 AC 22 ms
12,588 KB
testcase_18 AC 32 ms
14,368 KB
testcase_19 AC 42 ms
15,196 KB
testcase_20 AC 62 ms
16,868 KB
testcase_21 AC 62 ms
16,316 KB
testcase_22 AC 113 ms
22,196 KB
testcase_23 AC 273 ms
36,096 KB
testcase_24 AC 383 ms
39,232 KB
testcase_25 AC 543 ms
46,432 KB
testcase_26 AC 562 ms
47,296 KB
testcase_27 AC 342 ms
45,284 KB
testcase_28 AC 343 ms
44,252 KB
testcase_29 AC 562 ms
47,360 KB
testcase_30 AC 551 ms
45,292 KB
testcase_31 AC 513 ms
41,360 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List

main = getLine >> getLine >>= putStrLn . solve . sort . map read . words

solve x = if maximum d == minimum d && maximum d /= 0 then "YES" else "NO"
    where d = zipWith (-) x (tail x)
0