Submission #751665

# Submission time Handle Problem Language Result Execution time Memory
751665 2023-06-01T06:52:14 Z Halym2007 Catfish Farm (IOI22_fish) C++17
0 / 100
24 ms 5588 KB
#include <bits/stdc++.h>
#define ff first
#define ss second
#define sz size()
#define pb push_back
using namespace std;
typedef long long ll;
const int N = 300005;
ll a[102][102];
ll max_weights(int N, int M, vector <int> X, vector <int> Y, vector <int> W) {
	ll mx = 0;
	if (N > 2) {
		for (int i = 0; i < M; ++i) {
			a[X[i]][Y[i]] = W[i];
		}
		vector <ll> kl (N + 1, 0);
		for (int i = N - 1; i >= 0; i--) {
			kl[i] = max (kl[i + 1], a[1][i]);
		}
		for (int i = 1; i < N; ++i) {
			mx = max (mx, a[0][i] + kl[i + 1]);
			mx = max (mx, a[1][i]);
		}
		return (ll)mx;
	}
	for (int i = 0; i < M; ++i) {
		if (Y[i]) mx = max (mx, (ll)W[i]);
	}
	return (ll)mx;
}
# Verdict Execution time Memory Grader output
1 Runtime error 24 ms 5588 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 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 2 ms 2004 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 2004 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 24 ms 5588 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -