Submission #777891

#TimeUsernameProblemLanguageResultExecution timeMemory
777891Mouad_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 a=0;a<m;a++) ans+=W[a]; 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[a];
      |          ^