# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
391230 | lukameladze | Collecting Stamps 3 (JOI20_ho_t3) | C++14 | 76 ms | 106056 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 f first
#define s second
#define pb push_back
using namespace std;
const int N=205;
long long n,x[N],dp[N][N][N][2],t[N],le,ri,l,ans,ff,ff1;
long long go(long long x, long long xx) {
if (x<xx) swap(x,xx);
return min(x-xx,xx-x+l);
}
long long mn(long long a, long long b , long long c) {
return(min(a,min(b,c)));
}
int main() {
cin>>n>>l;
for (int i=1; i<=n; i++) {
cin>>x[i];
}
for (int i=1; i<=n; i++) {
cin>>t[i];
}
for (int le=0; le<=n+1; le++) {
for (int ri=0; ri<=n+1; ri++) {
for (int cnt=0; cnt<=n+1; cnt++) {
dp[le][ri][cnt][0]=dp[le][ri][cnt][1]=1e17;
}
}
}
dp[0][0][0][0]=0;
# | 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... |