Submission #106922


Source Code Expand

Copy
{-# LANGUAGE MultiParamTypeClasses,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,BangPatterns,RankNTypes #-}

import Control.Monad
import Control.Monad.ST
import Control.Applicative
import Control.Arrow
import Debug.Trace

import Data.List
import Data.Int
import Data.Maybe
import Data.Array.Unboxed
import Data.Array.ST
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.ByteString.Char8 as B

readInt = B.readInt >>> fmap fst >>> fromMaybe 0
readsInt = map readInt . B.words <$> B.getLine
readLine :: Read a => IO a
readLine = read <$> getLine 
readsLine :: Read a => IO [a]
readsLine = map read . words <$> getLine

cmpFst (a,_) (b,_) = compare a b
cmpSnd (_,a) (_,b) = compare a b
cmpLen a b = length a `compare` length b

swap (a,b) = (b,a)
rect a b = rect2 0 0 a b
rect2 i j a b = ((i,j),(a,b))

itof :: Int -> Double
itof = fromIntegral
casti = fromIntegral

maximize f l = snd $ maximumBy cmpFst [(f x,x) | x <- l]
minimize f l = snd $ minimumBy cmpFst [(f x,x) | x <- l]

infixr 2 <||> 
infixr 3 <&&>
p1 <||> p2 = (p1 &&& p2) >>> uncurry (||)
p1 <&&> p2 = (p1 &&& p2) >>> uncurry (&&)

main = do
    n <- readLn
    m <- readLn :: IO Int
    print $ n - m

Submission Info

Submission Time
Task A - 積雪深差
User autotaker
Language Haskell (GHC 7.4.1)
Score 100
Code Size 1256 Byte
Status
Exec Time 78 ms
Memory 1444 KB

Judge Result

Set Name Score / Max Score Test Cases
all 100 / 100 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt
Case Name Status Exec Time Memory
00_sample_01.txt 78 ms 1372 KB
00_sample_02.txt 43 ms 1312 KB
00_sample_03.txt 30 ms 1376 KB
test_01.txt 28 ms 1312 KB
test_02.txt 27 ms 1312 KB
test_03.txt 29 ms 1444 KB
test_04.txt 29 ms 1440 KB
test_05.txt 28 ms 1432 KB
test_06.txt 28 ms 1316 KB
test_07.txt 29 ms 1308 KB
test_08.txt 29 ms 1440 KB
test_09.txt 27 ms 1436 KB
test_10.txt 27 ms 1312 KB
test_11.txt 27 ms 1316 KB
test_12.txt 29 ms 1312 KB
test_13.txt 31 ms 1440 KB
test_14.txt 28 ms 1312 KB
test_15.txt 29 ms 1312 KB
test_16.txt 28 ms 1312 KB
test_17.txt 27 ms 1312 KB