# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986929 | alextodoran | Sparklers (JOI17_sparklers) | C++17 | 21 ms | 1372 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.
/**
_ _ __ _ _ _ _ _ _
|a ||t ||o d | |o |
| __ _| | _ | __| _ |
| __ |/_ | __ /__\ / _\|
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int N_MAX = 1000;
int N, K, T;
int X[N_MAX + 2];
bool dp[N_MAX + 2][N_MAX + 2];
bool check (int speed) {
dp[1][N] = true;
for (int l = 1; l <= K; l++) {
for (int r = N - (l == 1); r >= K; r--) {
dp[l][r] = false;
if (l > 1 && X[r] - X[l - 1] <= (ll) speed * (r - l + 1) * 2 * T) {
dp[l][r] |= dp[l - 1][r];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |