Submission #928335
Source Code Expand
import Control.Monad main :: IO () main = do n <- readLn l <- replicateM n $ do [t, a] <- map read . words <$> getLine return (t, a) print $ uncurry (+) $ solve l (0, 0) solve :: [(Int, Int)] -> (Int, Int) -> (Int, Int) solve [] (t, a) = (t, a) solve ((t, a):xs) (pt, pa) = solve xs (m * t, m * a) where nt = head [n | n <- [1..], n * t >= pt] na = head [n | n <- [1..], n * a >= pa] m = max nt na
Submission Info
Submission Time | |
---|---|
Task | C - AtCoDeer and Election Report |
User | Poly |
Language | Haskell (GHC 7.10.3) |
Score | 0 |
Code Size | 445 Byte |
Status | TLE |
Exec Time | 2155 ms |
Memory | 1070332 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
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 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 3 ms | 508 KB |
0_001.txt | AC | 3 ms | 508 KB |
0_002.txt | AC | 3 ms | 636 KB |
1_003.txt | AC | 3 ms | 508 KB |
1_004.txt | AC | 10 ms | 1276 KB |
1_005.txt | TLE | 2150 ms | 925820 KB |
1_006.txt | TLE | 2146 ms | 866428 KB |
1_007.txt | TLE | 2143 ms | 822524 KB |
1_008.txt | TLE | 2155 ms | 1012604 KB |
1_009.txt | TLE | 2155 ms | 1070332 KB |
1_010.txt | TLE | 2151 ms | 954620 KB |
1_011.txt | TLE | 2155 ms | 1021308 KB |
1_012.txt | TLE | 2152 ms | 972156 KB |
1_013.txt | TLE | 2119 ms | 319868 KB |
1_014.txt | AC | 17 ms | 1532 KB |