Submission #364037

#TimeUsernameProblemLanguageResultExecution timeMemory
364037wind_reaper카니발 티켓 (IOI20_tickets)C++17
Compilation error
0 ms0 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> ans(n, vector<int>(m)); long long a = 0; vector<int64_t> t(n); for(int i = 0; i < n; i++){ ans[i][0] = 0; t[i] = x[i][0]; } sort(t.begin(), t.end()); int64_t median = t[n/2]; for(int i = 0; i < n; i++) a += 1LL*abs(median - t[i]) allocate_tickets(ans); return a; }

Compilation message (stderr)

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:24:30: error: expected ';' before 'allocate_tickets'
   24 |   a += 1LL*abs(median - t[i])
      |                              ^
      |                              ;
   25 |  allocate_tickets(ans);
      |  ~~~~~~~~~~~~~~~~