-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU module Main (main) where main :: IO () main = putStrLn =<< unlines <$> map show <$> solve <$> map read <$> tail <$> lines <$> getContents updateRank :: Int -> Int -> Int -> Int updateRank x r y | y > x = r + 1 | otherwise = r solve :: [Int] -> [Int] solve (x:xs) = scanl (updateRank x) 1 xs solve _ = undefined