結果
| 問題 | No.1130 Grid Numbers |
| ユーザー |
|
| 提出日時 | 2024-05-05 19:41:54 |
| 言語 | Haskell (9.14.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 395 bytes |
| 記録 | |
| コンパイル時間 | 10,797 ms |
| コンパイル使用メモリ | 194,840 KB |
| 実行使用メモリ | 6,784 KB |
| 最終ジャッジ日時 | 2026-05-22 01:17:11 |
| 合計ジャッジ時間 | 11,332 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad
import Data.List (sort)
main :: IO ()
main = do
[h, w] <- f
replicateM h f >>= solve w
where
f = map read <$> words <$> getLine
solve :: Int -> [[Int]] -> IO ()
solve w ass = f as
where
as = sort $ concat ass
f xs = do
case xs of
[] -> return ()
_ -> do
putStrLn $ unwords $ map show $ take w xs
f (drop w xs)