結果
問題 |
No.3232 Not Tic Tac Toe
|
ユーザー |
|
提出日時 | 2025-08-15 21:48:30 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 103 ms / 2,000 ms |
コード長 | 1,226 bytes |
コンパイル時間 | 4,887 ms |
コンパイル使用メモリ | 335,048 KB |
実行使用メモリ | 12,160 KB |
最終ジャッジ日時 | 2025-08-15 21:52:41 |
合計ジャッジ時間 | 7,991 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i, s, e) for (int i = s; i < e; ++i) #define sort_(a) stable_sort(a.begin(), a.end()) #define rsort(a) stable_sort(a.rbegin(), a.rend()) #define sum(a) accumulate(a.begin(), a.end(), 0LL) #define join(a, d) accumulate(a.begin() + 1, a.end(), a[0], [](string s, string t) { return s + d + t; }) #define all(a) a.begin(), a.end() #define degrees(a) a * 180.0 / M_PI; #define radians(a) (a * M_PI) / 180.0; typedef long long ll; const long MOD = 1e9 + 7; int main(int, [[maybe_unused]] char *argv[]) { #ifdef DEBUG freopen(argv[1], "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); int H, W; cin >> H >> W; vector<vector<char>> ans(H, vector<char>(W, 'O')); rep(i, 0, H) { if (i % 2 == 0) { for (int j = 0; j < W; j += 4) { ans[i][j] = 'X'; if (j + 1 < W) ans[i][j + 1] = 'X'; } } else { for (int j = 2; j < W; j += 4) { ans[i][j] = 'X'; if (j + 1 < W) ans[i][j + 1] = 'X'; } } } rep(i, 0, H) { rep(j, 0, W) { cout << ans[i][j]; } cout << "\n"; } return 0; }