Submission #632189

# Submission time Handle Problem Language Result Execution time Memory
632189 2022-08-19T15:23:44 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;
};

#undef int
long long 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]});
    }
    ll sum=0;
    for(auto i:fish){
        sum+=i.weight;
    }
    return sum;
}

Compilation message

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:23:5: error: 'll' was not declared in this scope
   23 |     ll sum=0;
      |     ^~
fish.cpp:25:9: error: 'sum' was not declared in this scope
   25 |         sum+=i.weight;
      |         ^~~
fish.cpp:27:12: error: 'sum' was not declared in this scope
   27 |     return sum;
      |            ^~~