結果

問題 No.8032 Unavailability of Inequality Signs
ユーザー okaduki
提出日時 2018-04-01 22:22:59
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 589 bytes
コンパイル時間 7,928 ms
コンパイル使用メモリ 181,132 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-19 16:23:38
合計ジャッジ時間 10,282 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

{-# LANGUAGE FlexibleContexts, OverloadedStrings #-}
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Text.Printf
import Debug.Trace
import Data.Char (chr)

main = do
  [n] <- getInts
  replicateM_ n $ do
    [a,b] <- getInts
    printf "%c\n" $ case compare a b of
      LT -> chr 60
      EQ -> chr 61
      GT -> chr 62

-- util
getInts :: IO [Int]
getInts = map (fst . fromJust . B.readInt) . B.words <$> B.getLine

substr :: Int -> Int -> B.ByteString -> B.ByteString
substr b l s = B.take l $ B.drop b s
0