結果
問題 |
No.1169 Row and Column and Diagonal
|
ユーザー |
![]() |
提出日時 | 2020-08-15 11:47:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 2,168 ms |
コンパイル使用メモリ | 191,424 KB |
最終ジャッジ日時 | 2025-01-13 01:17:59 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; constexpr int INF = 1e9; int main() { int n; cin >> n; rep(i,n) { rep(j,n) cout << (2 * i - j + n) % n + 1 << " "; cout << endl; } return 0; }