Submission #1092931

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10929312024-09-25 12:31:39shivansh0809Holiday (IOI14_holiday)C++17
Compilation error
0 ms0 KiB
#include "holiday.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
struct PersistentSegTree
{ // find_kth returns the kth smallest element in the array in [l, r)
struct Vertex
{
Vertex *l, *r;
int sum;
int k_sum;
Vertex(int val) : l(nullptr), r(nullptr), sum(val), k_sum(0) {}
Vertex(int val, int k_sum) : l(nullptr), r(nullptr), sum(val), k_sum(k_sum) {}
Vertex(Vertex *l, Vertex *r) : l(l), r(r), sum(0), k_sum(0)
{
if (l)
sum += l->sum, k_sum += l->k_sum;
if (r)
sum += r->sum, k_sum += r->k_sum;
}
};
vector<Vertex *> roots;
map<int, pair<int, int>> compress;
int n;
PersistentSegTree(vector<int> v) : n(v.size())
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

holiday.cpp:5:13: error: 'long long long' is too long for GCC
    5 | #define int long long
      |             ^~~~
holiday.cpp:79:11: note: in expansion of macro 'int'
   79 | long long int findMaxAttraction(int n, int start, int d, int attraction[])
      |           ^~~
holiday.cpp:5:18: error: 'long long long' is too long for GCC
    5 | #define int long long
      |                  ^~~~
holiday.cpp:79:11: note: in expansion of macro 'int'
   79 | long long int findMaxAttraction(int n, int start, int d, int attraction[])
      |           ^~~