結果
| 問題 | No.3287 Golden Ring |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-05-02 12:22:36 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 668 bytes |
| 記録 | |
| コンパイル時間 | 2,439 ms |
| コンパイル使用メモリ | 333,356 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-02 12:22:42 |
| 合計ジャッジ時間 | 4,765 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i32 = int;
using i64 = long long;
#define int i64
signed main() {
int n;
cin >> n;
if (n == 2) {
cout << "No" << endl;
return 0;
}
if (n % 2 == 1) {
cout << "Yes" << endl;
for (int i = 0; i < n; i++) {
cout << i + 1 << " ";
}
cout << endl;
return 0;
}
vector<int> vals;
vals.push_back(1);
for (int i = 3; i <= n; i++) {
vals.push_back(i);
}
vals.push_back(2);
cout << "Yes" << endl;
for (int i = 0; i < n; i++) {
cout << vals[i] << " ";
}
cout << endl;
return 0;
}
vjudge1