結果
| 問題 |
No.3287 Golden Ring
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-11-05 23:55:17 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 458 bytes |
| コンパイル時間 | 1,176 ms |
| コンパイル使用メモリ | 138,368 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-11-05 23:55:22 |
| 合計ジャッジ時間 | 2,456 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
ソースコード
#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<cstring>
#include<cmath>
#include<string.h>
using namespace std;
int n;
int main()
{
//freopen("GR.in","r",stdin);
//freopen("GR.out","w",stdout);
cin>>n;
if(n==2)
{
cout<<"No"<<endl;
return 0;
}
cout<<"Yes"<<endl;
for(int i=1;i<=n;i++)
{
if(i%2==1)
cout<<i<<" ";
}
for(int i=n;i>=1;i--)
{
if(i%2==0)
cout<<i<<" ";
}
return 0;
}
vjudge1