結果
問題 | No.1169 Row and Column and Diagonal |
ユーザー |
![]() |
提出日時 | 2020-07-27 00:44:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 2,215 ms |
コンパイル使用メモリ | 191,124 KB |
最終ジャッジ日時 | 2025-01-12 06:39:32 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) int main() { int n; cin >> n; // assert assert(1 <= n && n < 500); assert(n % 2 == 1); rep(i, n) { rep(j, n) cout << ((2*i-j+n) % n + 1) << ' '; cout << '\n'; } return 0; }