結果
問題 |
No.3267 PQ Straight
|
ユーザー |
|
提出日時 | 2025-09-22 21:26:44 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 691 bytes |
コンパイル時間 | 2,885 ms |
コンパイル使用メモリ | 278,712 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-22 21:26:50 |
合計ジャッジ時間 | 5,504 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
// #pragma GCC optimize ("Ofast") // #pragma GCC optimize ("unroll-loops") // #pragma GCC target ("avx,avx2,fma") #include <bits/stdc++.h> using std::cin, std::cout, std::cerr; using ll = long long; int main() { std::ios::sync_with_stdio(false); int n; cin >> n; if(n & 1) { cout << "Yes\n"; std::vector<int> a(n), b(n); for(int i = 0; i < n; i ++) { int x = 2 * i, y = 2 * i + 1 + n; a[x % n] = i; b[y % n] = i; } for(int i = 0; i < n; i ++) cout << a[i] + 1 << ' '; cout << '\n'; for(int i = 0; i < n; i ++) cout << b[i] + 1 << ' '; cout << '\n'; } else { cout << "No\n"; } }