結果
| 問題 | No.3287 Golden Ring |
| コンテスト | |
| ユーザー |
ZeriToki
|
| 提出日時 | 2025-10-03 22:32:26 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 398µs | |
| コード長 | 692 bytes |
| 記録 | |
| コンパイル時間 | 2,066 ms |
| コンパイル使用メモリ | 329,548 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 10:06:29 |
| 合計ジャッジ時間 | 3,024 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long mod=998244353;
const long long mod100=1000000007;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
int N;
cin>>N;
if(N==2){
cout<<"No"<<endl;
return 0;
}
if(N%2==1){
cout<<"Yes\n";
for(int i=1;i<=N;i++){
cout<<i;
if(i==N) cout<<endl;
else cout<<" ";
}
}
else{
cout<<"Yes\n";
cout<<"2 1 ";
for(int i=3;i<=N;i++){
cout<<i;
if(i==N) cout<<endl;
else cout<<" ";
}
}
}
ZeriToki