結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
nak2yoshi
|
| 提出日時 | 2016-02-19 00:10:28 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 442 bytes |
| コンパイル時間 | 590 ms |
| コンパイル使用メモリ | 102,944 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 02:55:59 |
| 合計ジャッジ時間 | 1,088 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 4 WA * 3 |
ソースコード
import std.stdio,
std.conv,
std.string,
std.range,
std.math,
std.algorithm;
void main()
{
auto input = readln.split;
auto W = input[0].to!int, H = input[1].to!int;
auto C = input[2];
auto cur = (C == "B" ? 0 : 1);
auto color = ["B", "W"];
iota(H)
.tee!(_ => cur++)
.tee!(_ => writeln)
.each!(_ => iota(W)
.each!(_ => color[cur++ % 2].write));
}
nak2yoshi