Submission #724324

# Submission time Handle Problem Language Result Execution time Memory
724324 2023-04-15T05:56:38 Z raul2008487 Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#include "fish.h"

#include <vector>

long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
    ll ans=0,i;
    for(i=0;i<W.size();i++){
        ans+=W[i];
    }
    return ans;
}

Compilation message

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:6:5: error: 'll' was not declared in this scope
    6 |     ll ans=0,i;
      |     ^~
fish.cpp:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<W.size();i++){
      |         ^
fish.cpp:8:9: error: 'ans' was not declared in this scope
    8 |         ans+=W[i];
      |         ^~~
fish.cpp:10:12: error: 'ans' was not declared in this scope
   10 |     return ans;
      |            ^~~