結果

問題 No.420 mod2漸化式
ユーザー rabimea
提出日時 2025-09-29 14:12:10
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 614 bytes
コンパイル時間 3,268 ms
コンパイル使用メモリ 275,632 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-09-29 14:12:16
合計ジャッジ時間 5,026 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 16 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

// #pragma GCC optimize ("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target ("avx,avx2,fma")
#include <bits/stdc++.h>

using std::cin, std::cout, std::cerr;
using ll = long long;

ll Binom(int n, int m) {
    ll r = 1;
    for(int i = n; i > n - m; i --)
        r *= i;
    for(int i = 1; i <= m; i ++)
        r /= i;
    return r;
}

int main() {
    std::ios::sync_with_stdio(false);
    int x; cin >> x;
    if(x > 31) {
        cout << 0 << ' ' << 0 << '\n';
        return 0;
    }
    ll b = Binom(31, x);
    ll s = b * ((1LL << 31) - 1) / 31 * x;
    cout << b << ' ' << s << '\n';
}
0