結果
| 問題 | No.3287 Golden Ring |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-03 21:27:11 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 352µs | |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 1,995 ms |
| コンパイル使用メモリ | 332,244 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 08:51:32 |
| 合計ジャッジ時間 | 3,324 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
#include <cstdlib>
#include <math.h>
using namespace std;
using ll = long long;
int main(){
int n;
cin >> n;
if(n==2){
cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
vector<int>a(n);
for(int i=0;i<n;i++)a[i]=i+1;
if(n%2==0)swap(a[0],a[1]);
for(int i:a)cout << i << " ";
cout << endl;
return 0;
}