# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102825 | popovicirobert | Watching (JOI13_watching) | C++14 | 990 ms | 16140 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>
#define ll long long
#define ull unsigned long long
#define lsb(x) (x & (-x))
using namespace std;
const ll INF = 1e15;
const int MAXN = 2005;
int dp[MAXN + 1][MAXN + 1];
ll arr[MAXN + 1];
int nxt_a[MAXN + 1], nxt_b[MAXN + 1];
inline bool check(ll w, int n, int a, int b) {
int i, j;
for(i = 0; i <= n; i++) {
for(j = i; j <= n + 1; j++) {
if(arr[j] - arr[i] >= w) {
nxt_a[i] = j;
break;
}
}
for(j = i; j <= n + 1; j++) {
if(arr[j] - arr[i] >= 2LL * w) {
nxt_b[i] = j;
break;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |