結果
| 問題 |
No.3267 PQ Straight
|
| コンテスト | |
| ユーザー |
yu23578
|
| 提出日時 | 2025-09-12 22:16:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 1,000 ms |
| コード長 | 607 bytes |
| コンパイル時間 | 1,688 ms |
| コンパイル使用メモリ | 193,596 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-12 23:41:33 |
| 合計ジャッジ時間 | 4,306 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
int N;
signed main(){
cin>>N;
if(N % 2 == 0){
cout << "No" << "\n";
return 0;
}
else{
cout << "Yes" << "\n";
int x = (N+3) / 2;
for(int i = 1; i <= N; i++){
if(i % 2 == 1){
cout << ((i+1) / 2) << " ";
}
else{
cout << (i / 2 + (N+1) / 2) << " ";
}
}
cout << "\n";
for(int i = 1; i <= N; i++){
if(i % 2 == 1){
cout << x + i - 1 - ((i+1) / 2) << " ";
}
else{
cout << x + i - 1 - (i / 2 + (N+1) / 2) << " ";
}
}
}
}
yu23578