Submission #627353

# Submission time Handle Problem Language Result Execution time Memory
627353 2022-08-12T13:31:54 Z Valenz Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
{
    long long ans=0;
    for(int i=0;i<M;i++)
    {
        ans+=W[i];
    }
    return ans;
}

Compilation message

fish.cpp:1:36: error: 'std::vector' has not been declared
    1 | long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
      |                                    ^~~
fish.cpp:1:47: error: expected ',' or '...' before '<' token
    1 | long long max_weights(int N, int M,std::vector<int> X,std::vector<int> Y,std::vector<int> W)
      |                                               ^
fish.cpp: In function 'long long int max_weights(int, int, int)':
fish.cpp:6:14: error: 'W' was not declared in this scope
    6 |         ans+=W[i];
      |              ^