# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
373178 | Leonardo_Paes | Collecting Stamps 3 (JOI20_ho_t3) | C++17 | 148 ms | 67692 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;
const int maxn = 2e2+10;
const int inf = 1e9;
int dp[maxn][maxn][maxn][2], x[maxn], t[maxn];
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int n, l;
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 i=0; i<=n; i++){
for(int j=0; j<=n; j++){
for(int k=0; k<=n; k++){
dp[i][j][k][0] = dp[i][j][k][1] = inf;
}
}
}
dp[0][0][0][0] = dp[0][0][0][1] = 0;
auto prv = [&](int x){
if(x-1 < 1) return n;
return x-1;
};
auto nxt = [&](int x){
if(x+1 > n) return 1;
return x+1;
};
auto d = [&](int a, int b){
if(a > b) swap(a, b);
# | 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... |