Submission #961566

# Submission time Handle Problem Language Result Execution time Memory
961566 2024-04-12T08:13:51 Z Gr1sen Carnival Tickets (IOI20_tickets) C++17
Compilation error
0 ms 0 KB
#include"tickets.h"
#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define vi vector<int>
#define vvi vector<vi>

ll find_maximum(int k, vvi x) {
    allocate_tickets(x);
    ld a = 0;
    for (auto i : x) a += i[0];
    a /= x.size();
    ll b = round(a);
    ll t = 0;
    for (auto i : x) t += abs(i[0]-b);
    return t;
}

Compilation message

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:19:12: error: 'round' was not declared in this scope
   19 |     ll b = round(a);
      |            ^~~~~