Submission #729813

# Submission time Handle Problem Language Result Execution time Memory
729813 2023-04-24T16:08:42 Z caganyanmaz Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

int64_t max_weights(int n, int m, int[] x, int[] y, int[] w)
{
        int64_t sum = 0;
        for (int i = 0; i < m; i++)
                sum += w[i];
        return sum;
}

Compilation message

fish.cpp:4:41: error: expected ',' or '...' before 'x'
    4 | int64_t max_weights(int n, int m, int[] x, int[] y, int[] w)
      |                                         ^
fish.cpp: In function 'int64_t max_weights(int, int, int*)':
fish.cpp:8:24: error: 'w' was not declared in this scope
    8 |                 sum += w[i];
      |                        ^