Submission #3241500


Source Code Expand

Copy
import Control.Monad
main :: IO ()
main = replicateM 4 readLn >>= putStrLn . solve
    where
        solve [a, b, c, s]
            | null xs = "No"
            | otherwise = "Yes"
            where
                xs = [ w + x + y | w <- [a, a + 1], x <- [b, b + 1], y <- [c, c + 1], w + x + y == s]

Submission Info

Submission Time
Task A - 配点
User lodnix
Language Haskell (GHC 7.10.3)
Score 100
Code Size 308 Byte
Status
Exec Time 1 ms
Memory 508 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample-01.txt, sample-02.txt, sample-03.txt
All 100 / 100 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample-01.txt, sample-02.txt, sample-03.txt
Case Name Status Exec Time Memory
01.txt 1 ms 508 KB
02.txt 1 ms 508 KB
03.txt 1 ms 508 KB
04.txt 1 ms 508 KB
05.txt 1 ms 508 KB
06.txt 1 ms 508 KB
07.txt 1 ms 508 KB
08.txt 1 ms 508 KB
09.txt 1 ms 508 KB
10.txt 1 ms 508 KB
sample-01.txt 1 ms 508 KB
sample-02.txt 1 ms 508 KB
sample-03.txt 1 ms 508 KB