結果
問題 |
No.839 Keep Distance and Nobody Explodes
|
ユーザー |
![]() |
提出日時 | 2019-06-28 23:51:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 496 bytes |
コンパイル時間 | 583 ms |
コンパイル使用メモリ | 66,000 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 05:14:50 |
合計ジャッジ時間 | 2,745 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 28 |
ソースコード
#include <iostream> using namespace std; int main() { int n; cin >> n; int A[n+1][n+1], x = 1; for (int i = 1; i <= n/2; i++) { for (int j = 1; j <= n; j += 2) { A[i][j] = x++; A[i+n/2][j+1] = x++; } for (int j = 1; j <= n; j += 2) { A[i+n/2][j] = x++; A[i][j+1] = x++; } } for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) cout << A[i][j] << ' '; cout << endl; } }