結果

問題 No.3232 Not Tic Tac Toe
ユーザー urectanc
提出日時 2025-08-15 21:46:26
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 22,342 ms
コンパイル使用メモリ 401,396 KB
実行使用メモリ 54,764 KB
最終ジャッジ日時 2025-08-15 21:51:41
合計ジャッジ時間 25,744 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
        h: usize, w: usize
    }

    let mut res = vec![vec!['X'; w]; h];
    for i in 0..h {
        for j in 0..w {
            if ((i / 2) + j) % 2 == 0 {
                res[i][j] = 'O';
            }
        }
    }

    let ans = res
        .iter()
        .map(|row| row.iter().collect::<String>())
        .collect::<Vec<_>>()
        .join("\n");
    println!("{ans}");
}
0