結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-19 01:50:56 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 471 bytes |
| 記録 | |
| コンパイル時間 | 1,706 ms |
| コンパイル使用メモリ | 155,352 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-10-19 01:51:06 |
| 合計ジャッジ時間 | 8,471 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 33 TLE * 1 |
ソースコード
#include <iostream>
int main() {
using namespace std;
auto comb = [&](int n, int r) -> long long {
long long res = 1;
for (int i = 0; i < r; i++) {
res *= n - i;
res /= i + 1;
}
return res;
};
int x;
cin >> x;
constexpr long long mask = (1LL << 31) - 1;
long long count = comb(31, x);
long long tot = (x > 0) ? comb(30, x - 1) * mask : 0;
cout << count << " " << tot << endl;
}