結果
| 問題 | No.3287 Golden Ring | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-10-03 21:27:27 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 454 bytes | 
| コンパイル時間 | 937 ms | 
| コンパイル使用メモリ | 110,216 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-03 21:27:30 | 
| 合計ジャッジ時間 | 1,958 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 14 | 
ソースコード
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <iomanip>
#include <numeric>
using namespace std;
using ll = long long;
int main() {
	int N;cin >> N;
	if (N == 2) {
		cout << "No" << endl;
		return 0;
	}
	cout <<"Yes" << endl;
	if (N%2 == 1) {
		for (int i = 1;i <= N;i++) cout << i << " ";
		cout << endl;
	} else {
		for (int i = 1;i <= N-2;i++) cout << i << " ";
		cout << N <<" " <<N-1 << endl;
	}
}
            
            
            
        