# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126983 | darkkcyan | Kangaroo (CEOI16_kangaroo) | C++14 | 447 ms | 344440 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
using namespace std::placeholders;
#define llong long long
#define xx first
#define yy second
#define len(x) ((int)x.size())
#define rep(i,n) for (int i = -1; ++ i < n; )
#define rep1(i,n) for (int i = 0; i ++ < n; )
#define all(x) x.begin(), x.end()
// #define rand __rand
// mt19937 rand(chrono::system_clock::now().time_since_epoch().count()); // or mt19937_64
#define rem ((llong)1e9+7)
#define UP 1
#define DOWN 0
llong sol_51pts(int n, int cs, int cf) {
#define maxn 222
assert(n < maxn);
static llong dp[maxn][maxn][maxn][2];
static llong pref_sum[maxn][maxn][maxn][2];
function<llong(int, int, int, bool)> cal_pref_sum, cal;
cal_pref_sum = [&](int cur_n, int cur_cf, int cur_cs, bool dir) -> llong {
if (cur_cs == 0) return 0;
llong& ans = pref_sum[cur_n][cur_cf][cur_cs][dir];
if (ans == -1) ans = cal_pref_sum(cur_n, cur_cf, cur_cs - 1, dir) + cal(cur_n, cur_cf, cur_cs, dir);
return ans %= rem;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |