Submission #705093

#TimeUsernameProblemLanguageResultExecution timeMemory
705093danikoynovCatfish Farm (IOI22_fish)C++17
3 / 100
101 ms14048 KiB
#include "fish.h" #include <bits/stdc++.h> typedef long long ll; long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { bool all_even = true; for (int i = 0; i < M; i ++) if (X[i] % 2 != 0) all_even = false; if (all_even) { ll sum = 0; for (int i = 0; i < M; i ++) sum = sum + W[i]; return sum; } return 0; }

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:16:7: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   16 |       for (int i = 0; i < M; i ++)
      |       ^~~
fish.cpp:18:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   18 |         return sum;
      |         ^~~~~~
#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...