# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
724341 | 2023-04-15T06:06:36 Z | raul2008487 | Catfish Farm (IOI22_fish) | C++17 | 22 ms | 2772 KB |
#include "fish.h" #include <vector> long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { long long dp[W.size()]; long long i; dp[0]=W[0]; if(W[0]>W[1]){ dp[1]=W[0]; } else{ dp[1]=W[1]; } for(i=2;i<W.size();i++){ if(dp[i-1]>(dp[i-2]+W[i])){ dp[i]=dp[i-1]; } else{ dp[i]=dp[i-2]+W[i]; } //dp[i]=max(dp[i-1],dp[i-2]+W[i]); } return dp[W.size()-1]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 2772 KB | 1st lines differ - on the 1st token, expected: '40313272768926', found: '23654541340850' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | 1st lines differ - on the 1st token, expected: '2', found: '1' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Incorrect | 13 ms | 1960 KB | 1st lines differ - on the 1st token, expected: '21261825233649', found: '15662963514162' |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | 1st lines differ - on the 1st token, expected: '3', found: '2' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | 1st lines differ - on the 1st token, expected: '3', found: '2' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | 1st lines differ - on the 1st token, expected: '3', found: '2' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Incorrect | 13 ms | 1960 KB | 1st lines differ - on the 1st token, expected: '21261825233649', found: '15662963514162' |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 2772 KB | 1st lines differ - on the 1st token, expected: '40313272768926', found: '23654541340850' |
2 | Halted | 0 ms | 0 KB | - |