結果
問題 |
No.411 昇順昇順ソート
|
ユーザー |
|
提出日時 | 2020-04-14 17:20:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 388 bytes |
コンパイル時間 | 727 ms |
コンパイル使用メモリ | 66,284 KB |
最終ジャッジ日時 | 2025-01-09 18:46:39 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 WA * 3 |
ソースコード
#include <iostream> using lint = long long; void solve() { int n, k; std::cin >> n >> k; if (n == 2 && k == 1) { std::cout << 0 << std::endl; return; } int ans = (1 << (n - k)); if (k == 1) --ans; std::cout << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }