Submission #633047

# Submission time Handle Problem Language Result Execution time Memory
633047 2022-08-21T12:52:57 Z Lynkcat_ Catfish Farm (IOI22_fish) C++17
3 / 100
100 ms 8452 KB
#include "fish.h"
#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
// #define int ll
// #define N 
using namespace std;
long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W)
{
	vector<ll>f(N,0);
	for (int i=0;i<M;i++)
	{
		f[X[i]]+=W[i];
	}
	ll mx=0;
	ll ans=0;
	for (int i=0;i<N;i++)
	{
		if (i-2>=0) mx=max(mx,f[i-2]);
		f[i]+=mx;
		ans=max(ans,f[i]);
	}
	return ans;
}
	
# Verdict Execution time Memory Grader output
1 Correct 32 ms 3304 KB Output is correct
2 Correct 28 ms 3776 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 86 ms 8448 KB Output is correct
6 Correct 100 ms 8452 KB Output is correct
# 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 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Incorrect 16 ms 2768 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '16359027219341'
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 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Incorrect 16 ms 2768 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '16359027219341'
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 32 ms 3304 KB Output is correct
2 Correct 28 ms 3776 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 86 ms 8448 KB Output is correct
6 Correct 100 ms 8452 KB Output is correct
7 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -