結果
| 問題 |
No.1831 Parasol
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-04 22:54:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 434 bytes |
| コンパイル時間 | 1,675 ms |
| コンパイル使用メモリ | 167,220 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 12:30:51 |
| 合計ジャッジ時間 | 3,072 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
int main(){
int n;
cin>>n;
cout<<2*n-1<<endl;
for(int i=1;i<=n;i++){
cout<<i;
for(int j=n+1;j<2*n;j++){
cout<<' '<<j;
}
cout<<endl;
}
for(int i=1;i<n;i++){
cout<<n;
for(int j=1;j<i;j++){
cout<<' '<<n-j;
}
int a=n-i;
for(int j=1;j<=a;j++){
cout<<' '<<2*n-j;
}
cout<<endl;
}
return 0;
}