結果
| 問題 | No.398 ハーフパイプ(2) |
| コンテスト | |
| ユーザー |
femto
|
| 提出日時 | 2016-07-16 00:53:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 469 ms / 2,000 ms |
| コード長 | 812 bytes |
| コンパイル時間 | 539 ms |
| コンパイル使用メモリ | 67,408 KB |
| 実行使用メモリ | 116,736 KB |
| 最終ジャッジ日時 | 2024-06-27 14:38:15 |
| 合計ジャッジ時間 | 9,595 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long ll;
ll dp[7][110][110][610];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double X;
cin >> X;
X *= 4;
dp[0][100][0][0] = 1;
for(int i = 0; i < 6; i++) {
for(int j = 0; j <= 100; j++) {
for(int k = 0; k <= 100; k++) {
for(int l = 0; l <= 600; l++) {
if(dp[i][j][k][l] == 0) continue;
for(int m = 0; m <= 100; m++) {
dp[i + 1][min(j, m)][max(k, m)][l + m] += dp[i][j][k][l];
}
}
}
}
}
ll ans = 0;
for(int j = 0; j <= 100; j++) {
for(int k = 0; k <= 100; k++) {
for(int l = 0; l <= 600; l++) {
if(l - j - k == (int)X) {
ans += dp[6][j][k][l];
}
}
}
}
cout << ans << endl;
}
femto