結果

問題 No.411 昇順昇順ソート
ユーザー not_522
提出日時 2016-12-17 11:14:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 1,590 ms
コンパイル使用メモリ 166,484 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 04:18:24
合計ジャッジ時間 2,620 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

struct Initializer {
  Initializer() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(15);
  }
} initializer;

int main() {
  int n, k;
  cin >> n >> k;
  cout << (1 << (n - k)) - (k == 1 ? n : 0) << endl;
}
0