結果
問題 | No.1528 Not 1 |
ユーザー |
![]() |
提出日時 | 2021-06-09 19:34:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,368 bytes |
コンパイル時間 | 2,954 ms |
コンパイル使用メモリ | 191,528 KB |
最終ジャッジ日時 | 2025-01-22 05:03:04 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 18 WA * 1 |
ソースコード
#include <bits/stdc++.h> // #include <atcoder/all> // using namespace atcoder; #define _overload3(_1,_2,_3,name,...) name #define _rep(i,n) repi(i,0,n) #define repi(i,a,b) for(int i=int(a);i<int(b);++i) #define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__) #define rrep(i,n) for(int i=int(n-1);i>=int(0);--i) #define fore(i,a) for(auto &i:a) #define all(x) x.begin(),x.end() #define sz(x) ((int)(x).size()) #define bp(x) (__builtin_popcount((long long)(x))) #define pb push_back #define eb emplace_back #define mp make_pair #define V vector #define P pair<int,int> #define TP tuple<int,int,int> #define F first #define S second template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } using ll = long long; using ld = long double; using namespace std; const int INF = 1001001001; const ll INFL = 1001001001001001001; const int MAX = 2e6+1; int main() { int n;cin>>n; int m=(n+1)/2; if(n<=2){ cout<<1<<endl; } else if(n%2&&n<=7){ cout<<-1<<endl; } else if(n%2==0){ rep(i,m){ cout<<(i+1)*2<<" "; } cout<<endl; } else{ rep(i,m-1){ if((i+1)*2==6)continue; cout<<(i+1)*2<<" "; } cout<<"6 9"<<endl; } }