Submission #729811

# Submission time Handle Problem Language Result Execution time Memory
729811 2023-04-24T16:08:25 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:1:121: warning: extra tokens at end of #include directive
    1 | #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;                                                                                                     }
      |                                                                                                                         ^~~~~
/usr/bin/ld: /tmp/ccGoEeny.o: in function `main':
grader.cpp:(.text.startup+0x25e): undefined reference to `max_weights(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status