# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
361597 | saarang123 | Collecting Stamps 3 (JOI20_ho_t3) | C++14 | 506 ms | 282484 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;
#define int long long
const int N = 207;
const int inf = 1e18;
int dp[N][N][2][N]; //no (l, r), side, stamps
int x[N], t[N];
int n, m;
signed main() {
std::ios::sync_with_stdio(0);
std::cout.tie(0);
std::cin.tie(0);
#ifdef saarang
freopen("/home/saarang/Documents/cp/input.txt", "r", stdin);
freopen("/home/saarang/Documents/cp/output.txt", "w", stdout);
#endif
cin >> n >> m;
for(int i = 1; i <= n; i++)
cin >> x[i];
x[n + 1] = m;
for(int i = 1; i <= n; i++)
cin >> t[i];
for(int i = 0; i <= n + 2; i++)
for(int j = 0; j <= n + 2; j++)
for(int k = 0; k < 2; k++)
for(int l = 0; l <= n + 2; l++)
dp[i][j][k][l] = inf;
dp[0][n + 1][0][0] = dp[0][n + 1][1][0] = 0;
for(int i = 0; i < n; i++) {
for(int j = n + 1; j > i + 1; j--) {
# | 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... |