結果
問題 |
No.287 場合の数
|
ユーザー |
![]() |
提出日時 | 2020-12-25 01:46:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 1,710 ms |
コンパイル使用メモリ | 168,332 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 17:24:23 |
合計ジャッジ時間 | 2,455 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; using Vl=vector<ll>; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll n;cin >>n; Vl G(6*n+1,0); G[0]=1; for (int j = 0; j < 8; ++j) { auto ng = G; for (int i =n+1; i <=6*n;++i) { G[i]=ng[i]-ng[i-(n+1)]; } for (int i = 1; i <=6*n; ++i) { G[i]+=G[i-1]; } } cout <<G[6*n]<<"\n"; return 0; }