結果
問題 |
No.1528 Not 1
|
ユーザー |
|
提出日時 | 2021-06-14 23:28:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 456 bytes |
コンパイル時間 | 1,960 ms |
コンパイル使用メモリ | 165,844 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 07:03:58 |
合計ジャッジ時間 | 4,402 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 18 WA * 1 |
ソースコード
#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 || 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; } }