Submission #832421

#TimeUsernameProblemLanguageResultExecution timeMemory
832421NothingXDCatfish Farm (IOI22_fish)C++17
Compilation error
0 ms0 KiB
#include "fish.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; void debug_out(){cerr << endl;} template<typename Head, typename... Tail> void debug_out(Head H, Tail... T){ cerr << H << ' '; debug_out(T...); } #define debug(...) cerr << "(" << #__VA_ARGS__ << "): ", debug_out(__VA_ARGS__) #define F first #define S second #define all(x) x.begin(), x.end() #define MP(x, y) make_pair(x, y) const int maxn = 1e5 + 10; ll max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) { ll ans = 0 for (int i = 0; i < M; i++){ ans += W[i]; } return ans; }

Compilation message (stderr)

fish.cpp: In function 'll max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:27:2: error: expected ',' or ';' before 'for'
   27 |  for (int i = 0; i < M; i++){
      |  ^~~
fish.cpp:27:18: error: 'i' was not declared in this scope
   27 |  for (int i = 0; i < M; i++){
      |                  ^