Submission #632170

# Submission time Handle Problem Language Result Execution time Memory
632170 2022-08-19T14:53:57 Z khocengoren Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>

#define int long long int
#define F first
#define S second
#define pb push_back

using namespace std;

const int N = 0;

struct Fish {
    int col, row;
    int weight;
};

int max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> w){
    vector<Fish>fish;
    for(int i=0;i<M;i++){
        fish.pb({X[i],Y[i],w[i]});
    }
    int sum=0;
    for(auto i:fish){
        sum+=i.weight;
    }
    return sum;
}

// int32_t main(){
//     // freopen("input.txt","r",stdin);
//     // freopen("output.txt","w",stdout);
    
// }

Compilation message

/usr/bin/ld: /tmp/cchjXeRQ.o: in function `main':
grader.cpp:(.text.startup+0x25e): undefined reference to `max_weights(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status