結果
| 問題 | No.3287 Golden Ring | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-10-03 21:26:13 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 410 bytes | 
| コンパイル時間 | 1,650 ms | 
| コンパイル使用メモリ | 194,748 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-03 21:26:16 | 
| 合計ジャッジ時間 | 2,639 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 14 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int N; cin >> N;
    if(N == 2){cout << "No\n"; return 0;}
    cout << "Yes\n";
    if(N%2){
        for(int i=0; i<N; i++) cout << i+1 << " "; cout << endl;
    }
    else{
        cout << "1 3";
        for(int i=4; i<=N; i++) cout << " " << i;
        cout << " 2\n";
    }
}   
            
            
            
        