제출 #632189

#제출 시각아이디문제언어결과실행 시간메모리
632189khocengoren메기 농장 (IOI22_fish)C++17
컴파일 에러
0 ms0 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

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;
      |            ^~~