結果
問題 |
No.1528 Not 1
|
ユーザー |
|
提出日時 | 2021-06-14 23:30:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 1,777 ms |
コンパイル使用メモリ | 165,980 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 07:26:11 |
合計ジャッジ時間 | 3,610 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair<int, int> int main() { int n; cin >> n; if (n==1) { cout << "1" << endl; return 0; } if (n==3 || n==5) { cout << "-1" << endl; return 0; } if (n%2==0) { rep(i,n/2) cout << 2*(i+1) << " "; cout << endl; } else { cout << "3 6 2 4 "; for (int i = 4; 2*i < n; i++) { cout << 2*i << " "; } cout << endl; } }