Borderou de evaluare (job #3156359)

Utilizator alexdumitruAlexandru Dumitru alexdumitru Data 11 octombrie 2023 12:10:45
Problema Heavy Path Decomposition Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void SegTree::init(int)': main.cpp:34:25: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] 34 | memset(aint, 0, sizeof(aint)); | ^~~~~~~~~~~~ main.cpp: In function 'int query(int, int)': main.cpp:121:36: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 121 | return myMax(chain[id[x]].query(1, 1, csz[id[x]], 1, pos[x]), query(dad[chainBoss[id[x]]], y)); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:10:16: note: initializing argument 1 of 'int myMax(int&, int&)' 10 | int myMax(int &a, int &b) | ~~~~~^ Non zero exit status: 1

Ceva nu functioneaza?