# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1069996 | juicy | 도장 모으기 (JOI14_stamps) | C++17 | 44 ms | 35912 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;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
const int N = 3005, inf = 1e9;
int n, t;
int a[N], b[N], lt[N], rt[N], dp[N][N];
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
cin >> n >> t;
for (int i = 1; i <= n; ++i) {
int u, v, d, e; cin >> u >> v >> d >> e;
a[i] = u + v;
b[i] = d + e;
rt[i] = u + e + 2 * t * i;
lt[i] = v + d - 2 * t * i;
}
memset(dp, 0x3f, sizeof(dp));
dp[0][0] = 0;
for (int i = 1; i <= n; ++i) {
int mn = inf;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |