Submission #629074

# Submission time Handle Problem Language Result Execution time Memory
629074 2022-08-14T07:02:18 Z Justin1 Catfish Farm (IOI22_fish) C++17
0 / 100
26 ms 4172 KB
#include "fish.h"
 
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
 
ll dp[100005][2], ar[100005];
//0 = dont choose, 1 = choose

long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
	for (int i = 0; i < N; i++) ar[X[i]] = W[i];
	for (int i = 0; i < N; i++) {
		dp[i][0] = max(dp[i-1][0], dp[i-1][1]);
		dp[i][1] = dp[i-1][0] + W[i];
	}
	return max(dp[N-1][0], dp[N-1][1]);
}
# Verdict Execution time Memory Grader output
1 Runtime error 26 ms 4172 KB Execution killed with signal 11
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 Runtime error 1 ms 340 KB Execution killed with signal 11
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 Runtime error 1 ms 340 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 26 ms 4172 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -