結果
問題 |
No.1402 ビル街
|
ユーザー |
![]() |
提出日時 | 2021-02-19 23:04:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 1,543 ms |
コンパイル使用メモリ | 169,436 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-16 22:23:18 |
合計ジャッジ時間 | 7,780 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<int> ans(N + 2, 2000000000); if (N == 1){ ans[1] = 1; } else if (N == 2){ ans[1] = 1; ans[2] = 2; } else { ans[1] = 1; ans[2] = N - 1; for (int i = 3; i < N; i++){ ans[i] = i - 1; } ans[N] = N; } for (int i = 0; i < N + 2; i++){ cout << ans[i]; if (i < N + 1){ cout << ' '; } } cout << endl; }