Submission #632189

#TimeUsernameProblemLanguageResultExecution timeMemory
632189khocengoren메기 농장 (IOI22_fish)C++17
Compilation error
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; }

Compilation message (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;
      |            ^~~