| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365715 | stanirina | Catfish Farm (IOI22_fish) | C++20 | 20 ms | 4880 KiB |
#include "fish.h"
#include <bits/stdc++.h>
using namespace std;
long long max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w) {
vector<long long> dp(n+1);
dp[0]=0ll;
dp[1]=(long long)w[0];
dp[2]=(long long)max(w[0],w[1]);
for(int i=3;i<=n;i++){
dp[i]=max(dp[i-1],max(dp[i-2]+w[i-2],dp[i-3]+w[i-1]+w[i-3]));
}
return dp[n];
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
