Submission #1017828

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10178282024-07-09 10:33:07nickolasarapidisCarnival Tickets (IOI20_tickets)C++17
Compilation error
0 ms0 KiB
/*
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){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:55:22: error: 'MP' was not declared in this scope; did you mean 'M'?
   55 |    l[large.back()] = MP(j, (M - 1) - B[j].S);
      |                      ^~
      |                      M