結果
| 問題 | No.1131 Deviation Score |
| ユーザー |
|
| 提出日時 | 2020-08-02 19:06:10 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 448 bytes |
| コンパイル時間 | 6,250 ms |
| コンパイル使用メモリ | 180,300 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-06-28 03:42:39 |
| 合計ジャッジ時間 | 7,718 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 21 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
module Main where
import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.List
import Data.Maybe
import Control.Monad
main :: IO ()
main = do
BS.getLine
xn <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
let r = solve xn
mapM_ print r
solve :: [Int] -> [Int]
solve xn = map (\x -> 50 - ceiling (fromIntegral (avr - x) / 2)) xn
where
avr = ceiling $ fromIntegral (sum xn) / fromIntegral (length xn)