結果
| 問題 | No.3287 Golden Ring |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-05-02 12:16:41 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| 記録 | |
| コンパイル時間 | 2,389 ms |
| コンパイル使用メモリ | 333,460 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-02 12:16:50 |
| 合計ジャッジ時間 | 3,906 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 1 |
ソースコード
#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 == 1) {
cout << "Yes" << endl;
for (int i = 0; i < n; i++) {
cout << i + 1 << " ";
}
cout << endl;
return 0;
}
if (n == 2) {
cout << "Yes" << endl;
cout << "1 2" << 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