結果

問題 No.3232 Not Tic Tac Toe
ユーザー ルビサファせだい
提出日時 2025-08-17 00:29:29
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 850 bytes
コンパイル時間 1,648 ms
コンパイル使用メモリ 195,128 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-08-17 00:29:35
合計ジャッジ時間 4,749 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ull = unsigned long long;
template <class T>
using max_heap = priority_queue<T>;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<>>;
ll ll_min = numeric_limits<ll>::min();
ll ll_max = numeric_limits<ll>::max();
ll ALPHABET_N = 26;
static const ll INF = ll_max / 10;
#define rep(i, n) for (ll i = (ll)0; i < (ll)n; i++)
#define rep_(i, k, n) for (ll i = (ll)k; i < (ll)n; i++)
#define all(a) a.begin(), a.end()

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll h, w;
	cin >> h >> w;
	rep(i, h)
	{
		rep(j, w)
		{
			if (i % 4 == 0 || i % 4 == 1)
			{
				if (j % 2 == 0)
					cout << 'O';
				else
					cout << 'X';
			}
			else
			{
				if (j % 2 == 0)
					cout << 'X';
				else
					cout << 'O';
			}
		}
		cout << endl;
	}
	return 0;
}
0