結果
| 問題 | No.287 場合の数 |
| コンテスト | |
| ユーザー |
togatoga
|
| 提出日時 | 2015-10-10 08:08:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 708 bytes |
| 記録 | |
| コンパイル時間 | 1,373 ms |
| コンパイル使用メモリ | 157,552 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 23:58:49 |
| 合計ジャッジ時間 | 2,079 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<long,long> pll;
const int INF=1<<29;
const double EPS=1e-9;
const int MOD = 100000007;
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int N;
ll dp[10][1000];
int main(){
cin >> N;
dp[0][0] = 1;
for (int i = 0; i < 8; i++){
for (int j = 0; j <= 6 * N; j++){
if (dp[i][j] == 0)continue;
for (int k = 0; k <= N; k++){
dp[i + 1][j + k] += dp[i][j];
}
}
}
cout << dp[8][6 * N] << endl;
}
togatoga