結果
問題 | No.1402 ビル街 |
ユーザー |
![]() |
提出日時 | 2021-02-19 23:55:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 3,030 ms |
コンパイル使用メモリ | 193,012 KB |
最終ジャッジ日時 | 2025-01-19 01:59:28 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 2 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> A(n+2,1); A[0]=2000000000; A[n+1]=2000000000; int now=(n+2)/2; int plus=1; for(int i=1;i<=n;i++){ A[now]+=plus; if(i%2==1) now-=i; else now+=i; plus++; } rep(i,n+2){ if(i) cout<<" "; cout<<A[i]; } cout<<endl; return 0; }