結果
| 問題 |
No.1169 Row and Column and Diagonal
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-04-14 13:08:48 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 688 ms |
| コンパイル使用メモリ | 72,164 KB |
| 最終ジャッジ日時 | 2025-01-28 17:38:10 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 13 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;cin>>n;
vector<int> A(n);
int nw = 0;
for(int i = 0; n > i; i+=2){
A[i] = nw;
nw++;
}
for(int i = 1; n > i; i += 2){
A[i] = nw;
nw++;
}
for(int i = 0; n > i; i++){
for(int j = 0; n > j; j++){
cout << A[(i+j)%n]+1 << " "[j+1 == n];
}
cout << endl;
}
}