Borderou de evaluare (job #3296054)

Utilizator pepsiM4A1Ozturk Arif pepsiM4A1 Data 11 mai 2025 00:36:37
Problema Findmin Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void update_recursiv(int&, int&, int&, int&, int&)': main.cpp:34:27: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 34 | update_recursiv(2 * nod, stanga, mij, poz, val); | ~~^~~~~ main.cpp:25:27: note: initializing argument 1 of 'void update_recursiv(int&, int&, int&, int&, int&)' 25 | void update_recursiv(int &nod, int &stanga, int &dreapta, int &poz, int &val) | ~~~~~^~~ main.cpp:36:33: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 36 | update_recursiv(2 * nod + 1, mij + 1, dreapta, poz, val); | ~~~~~~~~^~~ main.cpp:25:27: note: initializing argument 1 of 'void update_recursiv(int&, int&, int&, int&, int&)' 25 | void update_recursiv(int &nod, int &stanga, int &dreapta, int &poz, int &val) | ~~~~~^~~ main.cpp: In function 'void update(int, int)': main.cpp:42:21: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 42 | update_recursiv(1, 1, n, poz, val); | ^ main.cpp:25:27: note: initializing argument 1 of 'void update_recursiv(int&, int&, int&, int&, int&)' 25 | void update_recursiv(int &nod, int &stanga, int &dreapta, int &poz, int &val) | ~~~~~^~~ main.cpp: In function 'int query_recursiv(int&, int&, int&, int&, int&)': main.cpp:52:33: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 52 | return min(query_recursiv(2 * nod, stanga, mij, query_x, min(query_y, mij)), | ~~^~~~~ main.cpp:45:25: note: initializing argument 1 of 'int query_recursiv(int&, int&, int&, int&, int&)' 45 | int query_recursiv(int &nod, int &stanga, int &dreapta, int &query_x, int &query_y) | ~~~~~^~~ main.cpp:53:39: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 53 | query_recursiv(2 * nod + 1, mij + 1, dreapta, max(query_x, mij + 1), query_y)); | ~~~~~~~~^~~ main.cpp:45:25: note: initializing argument 1 of 'int query_recursiv(int&, int&, int&, int&, int&)' 45 | int query_recursiv(int &nod, int &stanga, int &dreapta, int &query_x, int &query_y) | ~~~~~^~~ main.cpp: In function 'int query(int, int)': main.cpp:58:27: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 58 | return query_recursiv(1, 1, n, query_x, query_y); | ^ main.cpp:45:25: note: initializing argument 1 of 'int query_recursiv(int&, int&, int&, int&, int&)' 45 | int query_recursiv(int &nod, int &stanga, int &dreapta, int &query_x, int &query_y) | ~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?