結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー LeonardoneLeonardone
提出日時 2017-07-07 04:50:37
言語 Haskell
(9.8.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 325 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 149,760 KB
最終ジャッジ日時 2024-04-27 02:27:11
合計ジャッジ時間 496 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
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:4:1: error: [GHC-87110]
    Could not load module ‘Data.IntSet’.
    It is a member of the hidden package ‘containers-0.6.8’.
    Use -v to see a list of the files searched for.
  |
4 | import qualified Data.IntSet as S
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ソースコード

diff #

-- yukicoder My Practice
-- author: Leonardone @ NEETSDKASU

import qualified Data.IntSet as S
import Data.List
import Data.Bits

main = print . solve . map read . tail . words =<< getContents

solve a = S.size $ foldr f (S.singleton 0) $ nub a
    where
        f x s = S.union s t where
            t = S.map (xor x) s
    
0