Submission #300749

#TimeUsernameProblemLanguageResultExecution timeMemory
300749IgorICarnival Tickets (IOI20_tickets)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define forn(i, n) for (int (i) = 0; (i) != (n); (i)++) #define all(x) (x).begin(), (x).end() void allocate_tickets(vector<vector<int> > ans) ; long long find_maximim(int k, vector<vector<int> > x) { int n = x.size(), m = x[0].size(); if (m == 1) { vector<long long> s; for (int i = 0; i < n; i++) s.push_back(x[i][0]); sort(all(s)); long long si = 0; for (int i = 0; i < n / 2; i++) si += s[i + n / 2] - s[i]; allocate_tickets(vector<vector<int> >(n, vector<int>(m))); return si; } }

Compilation message (stderr)

tickets.cpp: In function 'long long int find_maximim(int, std::vector<std::vector<int> >)':
tickets.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
/tmp/cc6kfVXm.o: In function `main':
grader.cpp:(.text.startup+0x3b2): undefined reference to `find_maximum(int, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status