結果
問題 | No.82 市松模様 |
ユーザー | tjnt |
提出日時 | 2021-08-04 21:24:21 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 8,523 ms |
コンパイル使用メモリ | 164,500 KB |
実行使用メモリ | 8,340 KB |
最終ジャッジ日時 | 2023-10-14 21:24:58 |
合計ジャッジ時間 | 5,029 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
7,088 KB |
testcase_01 | AC | 3 ms
7,076 KB |
testcase_02 | AC | 2 ms
7,080 KB |
testcase_03 | AC | 2 ms
7,060 KB |
testcase_04 | AC | 3 ms
7,256 KB |
testcase_05 | AC | 3 ms
7,164 KB |
testcase_06 | AC | 3 ms
7,384 KB |
testcase_07 | AC | 2 ms
7,344 KB |
testcase_08 | AC | 4 ms
8,216 KB |
testcase_09 | AC | 3 ms
8,340 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Monad main :: IO () main = do l <- words <$> getLine :: IO [String] let (w,h,c) = let [l1,l2,l3] = l in (read l1, read l2, head l3) :: (Int,Int,Char) let x = if c == 'B' then 1 else 0 forM_ [1..h] $ \i -> do forM_ [1..w] $ \j -> do putChar $ if (i+j) `rem` 2 == x then 'W' else 'B' putStrLn ""