結果

問題 No.566 だいたい完全二分木
ユーザー aim_cpoaim_cpo
提出日時 2018-02-24 18:44:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 1,529 ms
コンパイル使用メモリ 162,104 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-23 04:53:55
合計ジャッジ時間 2,766 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 2 ms
6,812 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int n;

int main(){
  cin>>n;
  int mid=((1<<n)+1)/2;
  mid--;
  cout<<mid<<" ";
  for(int i=1;i<(1<<n);i++){
    if(i==mid)continue;
    if(i==(1<<n)-1)cout<<i<<"\n";
    else cout<<i<<" ";
  }
  return 0;
}
0