結果
問題 |
No.3287 Golden Ring
|
ユーザー |
|
提出日時 | 2025-10-03 21:24:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 540 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 97,272 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-10-03 21:24:27 |
合計ジャッジ時間 | 2,942 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 14 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <unordered_set> #include <cstring> #include <queue> #include <bitset> #include <map> #include <stack> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n,t; vector <int> v; cin >> n; int a = 1; int b = n; if(b%2==1) b-=1; while(b > 0) { v.push_back(b); b-=2; } while(a <= n) { v.push_back(a); a += 2; } for(auto it : v) { cout << it << ' '; } cout << '\n'; return 0; }