結果
問題 |
No.287 場合の数
|
ユーザー |
|
提出日時 | 2020-06-08 02:33:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 2,363 ms |
コンパイル使用メモリ | 191,140 KB |
最終ジャッジ日時 | 2025-01-11 00:02:14 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using lint=long long; int main(){ int n; cin>>n; // answer is [x^{6n}](1+x+...+x^n)^8 lint dp[601]={1}; rep(_,8){ for(int i=6*n;i>=n+1;i--) dp[i]-=dp[i-(n+1)]; rep(i,6*n) dp[i+1]+=dp[i]; } cout<<dp[6*n]<<'\n'; return 0; }