結果

問題 No.287 場合の数
ユーザー iastm
提出日時 2025-10-11 16:03:44
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 512 bytes
コンパイル時間 2,358 ms
コンパイル使用メモリ 137,196 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-11 16:03:49
合計ジャッジ時間 3,692 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <queue>
#include <atcoder/convolution>

using ll = long long;

int main() {
    int N;
    std::cin >> N;
    std::queue<std::vector<ll>> queue;
    for (int i = 0; i < 8; i++) queue.push(std::vector<ll>(N + 1, 1));
    while (queue.size() > 1u) {
        auto f = queue.front();
        queue.pop();
        auto g = queue.front();
        queue.pop();
        queue.push(atcoder::convolution_ll(f, g));
    }
    std::cout << queue.front()[N * 6] << std::endl;
}
0