Submission #60985893


Source Code Expand

{-# LANGUAGE BangPatterns #-}
import           Control.Monad
import qualified Data.ByteString.Char8 as BS
import           Data.Maybe
import           Data.List
readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine
f :: Int -> Int -> Int -> String
f a b c
  | a == b && b == c = "Yes"
  | (sum [a, b, c]) == 2*(maximum [a, b, c]) = "Yes"
  | otherwise = "No"
main :: IO ()
main = do
    [a, b, c] <- getIntList
    putStrLn $ f a b c

Submission Info

Submission Time
Task A - Equally
User suisankafe2
Language Haskell (GHC 9.4.5)
Score 100
Code Size 543 Byte
Status AC
Exec Time 2 ms
Memory 6936 KiB

Compile Error

app/Main.hs:2:1: warning: [-Wunused-imports]
    The import of ‘Control.Monad’ is redundant
      except perhaps to import instances from ‘Control.Monad’
    To import instances alone, use: import Control.Monad()
  |
2 | import           Control.Monad
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

app/Main.hs:5:1: warning: [-Wunused-imports]
    The import of ‘Data.List’ is redundant
      except perhaps to import instances from ‘Data.List’
    To import instances alone, use: import Data.List()
  |
5 | import           Data.List
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^

app/Main.hs:6:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      readInt :: BS.ByteString -> Int
  |
6 | readInt = fst . fromJust . BS.readInt
  | ^^^^^^^

app/Main.hs:7:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      readIntList :: BS.ByteString -> [Int]
  |
7 | readIntList = map readInt . BS.words
  | ^^^^^^^^^^^

app/Main.hs:8:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature: getInt :: IO Int
  |
8 | getInt = readInt <$> BS.getLine
  | ^^^^^^

app/Main.hs:8:1: warning: [-Wunused-top-binds]
    Defined but not used: ‘getInt’
  |
8 | getInt = readInt <$> BS.getLine
  | ^^^^^^

app/Main.hs:9:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature: getIntList :: IO [Int]
  |
9 | getIntList = readIntList <$> BS.getLine
  | ^^^^^^^^^^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 18
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 6896 KiB
00_sample_02.txt AC 2 ms 6924 KiB
00_sample_03.txt AC 1 ms 6856 KiB
01_random_01.txt AC 1 ms 6864 KiB
01_random_02.txt AC 1 ms 6936 KiB
01_random_03.txt AC 1 ms 6860 KiB
01_random_04.txt AC 1 ms 6864 KiB
01_random_05.txt AC 1 ms 6932 KiB
01_random_06.txt AC 1 ms 6892 KiB
01_random_07.txt AC 1 ms 6928 KiB
01_random_08.txt AC 1 ms 6652 KiB
01_random_09.txt AC 1 ms 6876 KiB
01_random_10.txt AC 1 ms 6864 KiB
01_random_11.txt AC 1 ms 6788 KiB
01_random_12.txt AC 1 ms 6772 KiB
01_random_13.txt AC 1 ms 6936 KiB
01_random_14.txt AC 1 ms 6888 KiB
01_random_15.txt AC 1 ms 6896 KiB