結果
問題 | No.669 対決!!! 飲み比べ |
ユーザー |
![]() |
提出日時 | 2018-03-24 20:35:49 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 7,199 ms |
コンパイル使用メモリ | 173,312 KB |
実行使用メモリ | 8,064 KB |
最終ジャッジ日時 | 2024-06-25 03:15:06 |
合計ジャッジ時間 | 8,144 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
importData.BitsBits,xorcanWin::BitsaIntegrala=>a->a->BoolcanWin k as = (/= 0) $ foldr1 xor $ fmap (`mod` (k + 1)) asmain::IO()main = do[_, k] <- fmap read . words <$> getLine :: IO [Int]as <- fmap read . words <$> getLine :: IO [Int]putStrLn $ if canWin k as then "YES" else "NO"