結果
| 問題 | No.1528 Not 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-06 15:36:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 499 bytes |
| コンパイル時間 | 1,532 ms |
| コンパイル使用メモリ | 165,848 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 21:45:17 |
| 合計ジャッジ時間 | 3,237 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int t = 2;
int m;
if(N%2 == 0) m = N/2;
else m = N/2+1;
if(N == 1) cout << 1 << endl;
else if(N == 2) cout << 1 << endl;
else if(N == 3) cout << -1 << endl;
else if(N == 4) cout << "2 4" << endl;
else if(N == 5) cout << -1 << endl;
else{
cout << "3 6";
for(int i=2;i<=N;i+=2){
if(i == 6) continue;
cout << " " << i;
t++;
if(t == m) break;
}
cout << endl;
}
}