結果

問題 No.2732 Similar Permutations
ユーザー kikuepl
提出日時 2024-04-19 22:01:37
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 918 bytes
コンパイル時間 5,161 ms
コンパイル使用メモリ 307,512 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-10-11 15:09:17
合計ジャッジ時間 33,010 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 93
権限があれば一括ダウンロードができます

ソースコード

diff #

/*****/
#include <bits/stdc++.h>
#include <atcoder/all>

using namespace atcoder;
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define all(x) begin(x),end(x)

const int MOD = 1e9 + 7;
const int mod = 998244353;
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; }
/*****/

int n;
ll a[200009];
int main()
{
  cin >> n;
  rep(i,0,n) cin >> a[i];
  if (n<=2)
  {
    cout << -1 << endl;
    return 0;
  }
  vector<int> P(n);
  vector<int> p(n);
  rep(i,0,n)
  {
    P[i] = i+1;
  }
  rep(i,0,n)
  {
    p[i] = n-i;
  }
  rep(i,0,n)
  {
    if (0<i) cout << " ";
    cout << P[i];
  }
  cout << endl;
  rep(i,0,n)
  {
    if (0<i) cout << " ";
    cout << p[i];
  }
  cout << endl;
}
0