Submission #628408

# Submission time Handle Problem Language Result Execution time Memory
628408 2022-08-13T11:38:40 Z Bobby Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
#include "fish.h"
using namespace std;
#define int long long
int max_weights(int N, int M, int[] X, int[] Y, int[] W){
	int ans = 0;
	for(int x:w)ans+=x;
	return ans;
}

Compilation message

fish.cpp:5:37: error: expected ',' or '...' before 'X'
    5 | int max_weights(int N, int M, int[] X, int[] Y, int[] W){
      |                                     ^
fish.cpp: In function 'long long int max_weights(long long int, long long int, long long int*)':
fish.cpp:7:12: error: 'w' was not declared in this scope
    7 |  for(int x:w)ans+=x;
      |            ^