結果
問題 |
No.1528 Not 1
|
ユーザー |
|
提出日時 | 2021-06-04 20:43:42 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 663 bytes |
コンパイル時間 | 2,453 ms |
コンパイル使用メモリ | 138,996 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 10:08:26 |
合計ジャッジ時間 | 3,006 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 18 WA * 1 |
ソースコード
#include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; using ll = long long; int main() { int n; cin >> n; if(n % 2 == 1 && n <= 5) { cout << -1 << endl; } else if(n % 2 == 0) { for(int i = 0; i < n / 2; i++) { cout << (i + 1) * 2 << " "; } cout << endl; } else { for(int i = 0; i < n / 2; i++) { if((i + 1) * 2 == 6) { continue; } cout << (i + 1) * 2 << " "; } cout << 6 << " " << 3 << endl; } return 0; }