# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1017828 | nickolasarapidis | Carnival Tickets (IOI20_tickets) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
IOI 2020
Day 1 - problem 3 (tickets)
Author: Nickolas Arapidis
*/
#include "tickets.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
#define make_pair MP
ll calculate_score(vector<int> A){
int N = A.size();
ll sum = 0;
int mid = A[N/2];
for(int i = 0; i < N; i++){
sum += abs(A[i] - mid);
}
return sum;
}
ll find_maximum(int k, vector<vector<int>> X){