結果
| 問題 |
No.839 Keep Distance and Nobody Explodes
|
| コンテスト | |
| ユーザー |
jell
|
| 提出日時 | 2019-06-15 16:48:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 538 bytes |
| コンパイル時間 | 1,694 ms |
| コンパイル使用メモリ | 166,620 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-19 01:47:57 |
| 合計ジャッジ時間 | 3,413 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int n;
int grid[301][301];
int main() {
cin>>n;
n/=2;
int cnt=0;
for(int i=0; i<n; ++i) {
for(int j=0; j<n; ++j) {
grid[i][j]=++cnt;
grid[i+n][j+n]=++cnt;
}
for(int j=0; j<n; ++j) {
grid[i+n][j]=++cnt;
grid[i][j+n]=++cnt;
}
}
for(int i=0; i<n*2; ++i) {
for(int j=0; j<n*2; ++j) {
if(j) cout<<" ";
cout<<grid[i][j];
}
cout<<"\n";
}
}
jell