Submission #2531541


Source Code Expand

import Data.List
f ::[Int]->[Int]->Integer->Bool
f [] [] d
    |d>=0 =True
    |otherwise=False
f (a:as) (b:bs) d
    |a <= b =f as bs (fromIntegral((b-a) `div` 2) + d)
    |otherwise=f as bs (d - fromIntegral (a-b))

main = do
       e<-getLine
       a<-getLine
       b<-getLine
       let as=sort $ map read (words a)::[Int]
           bs=sort $ map read (words b)::[Int]
       putStrLn $ if f as bs (0::Integer) then "Yes" else "No"

Submission Info

Submission Time
Task B - Two Arrays
User sinapusu2002
Language Haskell (GHC 7.10.3)
Score 0
Code Size 453 Byte
Status WA
Exec Time 143 ms
Memory 11644 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
WA × 1
AC × 25
WA × 3
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt, 1_027.txt
Case Name Status Exec Time Memory
0_000.txt AC 2 ms 508 KB
0_001.txt WA 2 ms 508 KB
0_002.txt AC 2 ms 508 KB
1_003.txt AC 90 ms 5756 KB
1_004.txt AC 92 ms 7548 KB
1_005.txt AC 140 ms 10620 KB
1_006.txt AC 140 ms 10620 KB
1_007.txt AC 140 ms 10620 KB
1_008.txt AC 141 ms 10620 KB
1_009.txt AC 141 ms 10620 KB
1_010.txt AC 141 ms 10620 KB
1_011.txt AC 140 ms 10620 KB
1_012.txt WA 141 ms 10620 KB
1_013.txt AC 142 ms 10620 KB
1_014.txt AC 141 ms 10620 KB
1_015.txt AC 142 ms 11644 KB
1_016.txt WA 139 ms 10620 KB
1_017.txt AC 140 ms 10620 KB
1_018.txt AC 139 ms 10620 KB
1_019.txt AC 143 ms 10620 KB
1_020.txt AC 139 ms 10364 KB
1_021.txt AC 137 ms 10364 KB
1_022.txt AC 137 ms 10364 KB
1_023.txt AC 137 ms 10364 KB
1_024.txt AC 139 ms 10364 KB
1_025.txt AC 139 ms 10364 KB
1_026.txt AC 140 ms 10364 KB
1_027.txt AC 139 ms 10364 KB