結果
| 問題 |
No.3287 Golden Ring
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-03 21:45:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 405 bytes |
| コンパイル時間 | 776 ms |
| コンパイル使用メモリ | 81,348 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-03 21:45:59 |
| 合計ジャッジ時間 | 1,848 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
using ll = long long;
int main(void){
int n; cin >> n;
if(n==2){
cout << "No" << endl; return 0;
}
cout << "Yes" << endl;
deque<int> ans;
ans.push_back(1);
for(int i=2; i<=n; i++){
if(i%2) ans.push_back(i);
else ans.push_front(i);
}
for(auto p:ans) cout << p << ' ';
return 0;
}