Submission #832420

# Submission time Handle Problem Language Result Execution time Memory
832420 2023-08-21T10:13:25 Z NothingXD Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#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) {
	n = N, m = M;
	ll ans = 0
	for (int i = 0; i < m; i++){
		ans += W[i];
	}
	return ans;
}

Compilation message

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