Submission #1061387

#TimeUsernameProblemLanguageResultExecution timeMemory
1061387MarwenElarbiCatfish Farm (IOI22_fish)C++17
0 / 100
54 ms7408 KiB
#include <bits/stdc++.h> #include "fish.h" using namespace std; #define pb push_back #define ll long long 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 < W.size(); ++i) { (X[i]==0 ? a : b) += W[i]; } return max(a,b); }

Compilation message (stderr)

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:11:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |   for (int i = 0; i < W.size(); ++i)
      |                   ~~^~~~~~~~~~
#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...