結果
| 問題 |
No.1169 Row and Column and Diagonal
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-03 20:22:51 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 748 bytes |
| コンパイル時間 | 3,040 ms |
| コンパイル使用メモリ | 129,432 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 00:33:17 |
| 合計ジャッジ時間 | 4,388 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 13 |
ソースコード
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <array>
#include <cassert>
#include <utility>
#include <vector>
int main(void){
std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(16);
constexpr int N = 500;
std::array<std::array<int, N>, N> Arr;
int n; std::cin >> n;
for(int i = 1; i <= n; ++i){
for(int x = 0, y = i - 1; x < n; ++x, ++y){
if(y >= n) y -= n;
Arr[x][y] = i;
}
}
for(int i = 0; i < n; ++i){
for(int j = 0; j < n; ++j){
std::cout << Arr[i][j];
if(j + 1 == n) std::cout << '\n';
else std::cout << ' ';
}
}
return 0;
}