Submission #1289635

#TimeUsernameProblemLanguageResultExecution timeMemory
1289635bilgunCarnival Tickets (IOI20_tickets)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;

long long find_maximum(int k, vector<vector<int>> vec){
    int n = vec.size(), m = vec[0].size();
    vector<int> ans;
    int count = 0, s = 0;
    for( int i = 0; i < n; i++){
        ans.push_back(vec[i][0]);
        count += vec[i][0];
    }
    count /= n;
    for( int i = 0; i < n; i++){
        s += abs(vec[i][0] - count);
    }
    allocate_tickets(ans);
}

Compilation message (stderr)

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:16:5: error: 'allocate_tickets' was not declared in this scope
   16 |     allocate_tickets(ans);
      |     ^~~~~~~~~~~~~~~~
tickets.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^