Submission #728452

#TimeUsernameProblemLanguageResultExecution timeMemory
728452beaconmcCarnival Tickets (IOI20_tickets)C++14
Compilation error
0 ms0 KiB
#include "tickets.h"d

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

typedef long long ll;
using namespace std;
//using namespace __gnu_pbds;

#define FOR(i, x, y) for(ll i=x; i<y; i++)
#define FORNEG(i, x, y) for(ll i=x; i>y; i--)
//#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)



long long find_maximum(int k, vector<vector<int>> x) {
	ll n = x.size();
	ll m = x[0].size();
	vector<vector<int>> idk;
	FOR(i,0,n){
		vector<int> temp;
		FOR(j,0,m){
			temp.push_back(0);
		}
		idk.push_back(temp);
	}
	vector<ll> stuff;
	FOR(i,0,n){
		stuff.push_back(x[i][0]);
	}
	sort(stuff.begin(), stuff.end());
	ll med = n/2;
	ll ans = 0;
	for (auto&i : stuff){
		ans += abs(i - stuff[med]);
	}
	allocate_tickets(idk);
	return ans;


}

Compilation message (stderr)

tickets.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include "tickets.h"d
      |          ^~~~~~~~~~~~
tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:39:2: error: 'allocate_tickets' was not declared in this scope
   39 |  allocate_tickets(idk);
      |  ^~~~~~~~~~~~~~~~