Cleaner 06, thanks Jacky and Lumi
This commit is contained in:
parent
4ffa71e1cc
commit
75639dcf20
|
@ -18,7 +18,7 @@ main = do
|
|||
lns <- lines <$> getContents
|
||||
print
|
||||
$ product
|
||||
$ (\(time, dist) -> (\x -> floor (time / 2 + x) - ceiling (time / 2 - x) + 1) . subtract 0.000001 . sqrt . subtract dist . (**2) . (/2) $ time)
|
||||
$ (\(time, dist) -> (\x -> ceiling (time / 2 + x) - floor (time / 2 - x) - 1) . sqrt . subtract dist . (**2) . (/2) $ time)
|
||||
<$> ((bimap (fromIntegral @_ @Double) (fromIntegral @_ @Double)
|
||||
. parseRace <$>)
|
||||
. drop 1
|
||||
|
|
|
@ -17,8 +17,7 @@ main :: IO ()
|
|||
main = do
|
||||
lns <- lines <$> getContents
|
||||
print
|
||||
$ (\(time, dist) -> (\x -> floor (time / 2 + x) - ceiling (time / 2 - x) + 1)
|
||||
. subtract 0.000001
|
||||
$ (\(time, dist) -> (\x -> ceiling (time / 2 + x) - floor (time / 2 - x) - 1)
|
||||
. sqrt
|
||||
. subtract dist
|
||||
. (**2)
|
||||
|
|
Loading…
Reference in New Issue