結果

問題 No.406 鴨等間隔の法則
ユーザー aimyaimy
提出日時 2017-04-16 07:49:31
言語 Haskell
(9.8.2)
結果
AC  
実行時間 342 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 3,145 ms
コンパイル使用メモリ 158,384 KB
実行使用メモリ 26,728 KB
最終ジャッジ日時 2023-09-21 18:26:36
合計ジャッジ時間 8,586 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
14,076 KB
testcase_01 AC 2 ms
7,260 KB
testcase_02 AC 2 ms
7,208 KB
testcase_03 AC 3 ms
7,216 KB
testcase_04 AC 182 ms
19,432 KB
testcase_05 AC 72 ms
13,384 KB
testcase_06 AC 72 ms
13,724 KB
testcase_07 AC 82 ms
13,964 KB
testcase_08 AC 183 ms
19,452 KB
testcase_09 AC 202 ms
19,484 KB
testcase_10 AC 82 ms
14,176 KB
testcase_11 AC 152 ms
15,792 KB
testcase_12 AC 103 ms
14,932 KB
testcase_13 AC 102 ms
15,004 KB
testcase_14 AC 272 ms
22,360 KB
testcase_15 AC 22 ms
11,672 KB
testcase_16 AC 22 ms
11,776 KB
testcase_17 AC 12 ms
11,612 KB
testcase_18 AC 22 ms
11,792 KB
testcase_19 AC 32 ms
13,236 KB
testcase_20 AC 43 ms
12,708 KB
testcase_21 AC 32 ms
12,136 KB
testcase_22 AC 72 ms
15,948 KB
testcase_23 AC 111 ms
15,120 KB
testcase_24 AC 233 ms
20,396 KB
testcase_25 AC 202 ms
19,636 KB
testcase_26 AC 332 ms
26,728 KB
testcase_27 AC 182 ms
17,640 KB
testcase_28 AC 182 ms
17,580 KB
testcase_29 AC 342 ms
25,504 KB
testcase_30 AC 332 ms
26,672 KB
testcase_31 AC 193 ms
19,404 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 = getContents >>= putStrLn . (\p -> if p then "YES" else "NO") . kamo . map read . words

kamo (n:xs) = d /= 0 && all (==d) ds
 where (d:ds) = let xs' = sort xs in zipWith (-) xs' (tail xs')
0