Submission #821963

#TimeUsernameProblemLanguageResultExecution timeMemory
821963boyliguanhanCatfish Farm (IOI22_fish)C++17
0 / 100
18 ms2788 KiB
#include "fish.h" #include <vector> using namespace std; int fish[2][100100]; long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) { for(int i = 0; i < M; i++) fish[X[i]][Y[i]+1]=W[i]; for(int i = 0; i < 2; i++) for(int j = 1; j <= N; j++) fish[i][j]+=fish[i][j-1]; if(N>2) { int ans = 0; for(int i = 0; i <= N; i++) ans = max(ans, fish[1][100000]-fish[1][i]+fish[0][i]); return ans; } else { return max(fish[0][100000], fish[1][100000]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...