Submission #777890

#TimeUsernameProblemLanguageResultExecution timeMemory
777890Mouad_oujCatfish Farm (IOI22_fish)C++17
Compilation error
0 ms0 KiB
#include<iostream>//sub1 using namespace std; int64_t max_weights(int N, int M, int[] X, int[] Y, int[] W) { int64_t ans=0; for(int x=0;x<M;x++) ans+=W[x]; return ans; }

Compilation message (stderr)

fish.cpp:3:41: error: expected ',' or '...' before 'X'
    3 | int64_t max_weights(int N, int M, int[] X, int[] Y, int[] W)
      |                                         ^
fish.cpp: In function 'int64_t max_weights(int, int, int*)':
fish.cpp:7:10: error: 'W' was not declared in this scope
    7 |     ans+=W[x];
      |          ^