Submission #634120

#TimeUsernameProblemLanguageResultExecution timeMemory
634120UtahaCatfish Farm (IOI22_fish)C++17
0 / 100
106 ms13656 KiB
#include "fish.h" #include <bits/stdc++.h> using namespace std; const int maxN = 100005; int n_col = 0; long long dp[4][3][maxN]; vector<vector<long long>> prefix; const long long INF = 1e18; const int UP = 0; const int DOWN = 1; const int STOP = 2; long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { long long A = 0; long long B = 0; for(int i = 0; i <M; i++) { if(X[i] == 0) { A += W[i]; } else{ B += W[i]; } } return max(A, B); }
#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...