Submission #729826

# Submission time Handle Problem Language Result Execution time Memory
729826 2023-04-24T16:47:40 Z caganyanmaz Catfish Farm (IOI22_fish) C++17
0 / 100
28 ms 7764 KB
#include <bits/stdc++.h>
#define pb push_back
#define int int64_t
using namespace std;

int max_weights(int32_t n, int32_t m, vector<int32_t> x, vector<int32_t> y, vector<int32_t> w)
{
        vector<int> v(n);
        for (int i = 0; i < m; i++)
                v[x[i]] = w[i];
        vector<vector<int>> dp(n, vector<int>(3));
        for (int i = 1; i < n; i++)
        {
                dp[i][0] = max({dp[i-1][0], dp[i-1][1] + w[i-1], dp[i-1][2]});
                dp[i][1] = max({dp[i-1][1], dp[i-1][2]});
                dp[i][2] = max({dp[i-1][0] + w[i]});
        }
        return max({dp[n-1][0], dp[n-1][1], dp[n-1][2]});
}
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 7764 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '34455709198970'
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 Incorrect 8 ms 6556 KB 1st lines differ - on the 1st token, expected: '10082010', found: '23425106453410'
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 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 8 ms 6556 KB 1st lines differ - on the 1st token, expected: '10082010', found: '23425106453410'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 7764 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '34455709198970'
2 Halted 0 ms 0 KB -