結果
| 問題 |
No.1528 Not 1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-04 20:17:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| コンパイル時間 | 1,535 ms |
| コンパイル使用メモリ | 167,956 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-19 08:25:01 |
| 合計ジャッジ時間 | 3,199 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 18 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include "debug.hpp"
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll N; cin >> N;
if (N == 1) {
cout << 1 << '\n';
return 0;
} else if (N == 2 || N == 3 || N == 5) {
cout << -1 << '\n';
return 0;
} else if (N % 2 == 0) {
for (ll i = 1; i <= N / 2; i++) {
cout << (i * 2) << ' ';
}
} else {
cout << 3 << ' ';
cout << 6 << ' ';
for (ll i = 1; i <= N / 2; i++) {
if (i == 3) continue;
cout << (i * 2) << ' ';
}
}
return 0;
}