結果

問題 No.3232 Not Tic Tac Toe
ユーザー tnakao0123
提出日時 2025-08-16 11:47:47
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 41,448 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-08-16 11:47:50
合計ジャッジ時間 3,016 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |   scanf("%d%d", &h, &w);
      |   ~~~~~^~~~~~~~~~~~~~~~

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 3232.cc:  No.3232 Not Tic Tac Toe - yukicoder
 */

#include<cstdio>
#include<algorithm>

using namespace std;

/* main */

int main() {
  int h, w;
  scanf("%d%d", &h, &w);
  
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      char c = ((i + (j >> 1)) & 1) ? 'X' : 'O';
      putchar(c);
    }
    putchar('\n');
  }

  return 0;
}
0