結果

問題 No.566 だいたい完全二分木
ユーザー pekempeypekempey
提出日時 2017-09-08 22:36:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 987 ms
コンパイル使用メモリ 102,636 KB
最終ジャッジ日時 2025-01-05 02:46:28
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <random>

using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a((1 << n) - 1);

  for (int i = 0; i < a.size(); i++) {
    a[i] = i + 1;
  }

  mt19937 mt(12345);
  shuffle(a.begin(), a.end(), mt);

  for (int x : a) {
    cout << x << ' ';
  }
}
0