結果
| 問題 |
No.398 ハーフパイプ(2)
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2022-01-06 03:34:43 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 891 bytes |
| コンパイル時間 | 1,569 ms |
| コンパイル使用メモリ | 140,380 KB |
| 実行使用メモリ | 339,056 KB |
| 最終ジャッジ日時 | 2024-11-06 16:07:55 |
| 合計ジャッジ時間 | 20,434 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 17 |
ソースコード
#include <cassert>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <map>
#include <queue>
#include <set>
#include <cstring>
#include <vector>
using namespace std;
typedef long long ll;
ll memo[7][601][101][101];
double X;
ll dfs(int i, int score, int mi, int ma) {
if (memo[i][score][mi][ma] != -1) {
return memo[i][score][mi][ma];
}
ll res = 0;
if (i == 6) {
int r = score - (mi + ma);
if (100 * X == 25 * r) {
// fprintf(stderr, "score: %d, mi: %d, ma: %d\n", score, mi, ma);
res = 1LL;
} else {
res = 0LL;
}
} else {
for (int s = 0; s <= 100; ++s) {
res += dfs(i + 1, score + s, min(mi, s), max(ma, s));
}
}
return memo[i][score][mi][ma] = res;
}
int main() {
memset(memo, -1, sizeof(memo));
cin >> X;
cout << dfs(0, 0, 100, 0) << endl;
return 0;
}
siman