Borderou de evaluare (job #2567953)

Utilizator alex23alexandru andronache alex23 Data 3 martie 2020 19:51:02
Problema Arbori de intervale Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:4:104: error: 'function' in namespace 'std' does not name a template type void update(std::vector<int>& tree, int position, int index, int value, int start, int end, const std::function<int(int, int)>& compare) { ^~~~~~~~ main.cpp:4:112: error: expected ',' or '...' before '<' token void update(std::vector<int>& tree, int position, int index, int value, int start, int end, const std::function<int(int, int)>& compare) { ^ main.cpp: In function 'void update(std::vector<int>&, int, int, int, int, int, int)': main.cpp:12:64: error: 'compare' was not declared in this scope update(tree, position, 2*index + 1, value, start, div, compare); ^~~~~~~ main.cpp:14:64: error: 'compare' was not declared in this scope update(tree, position, 2*index + 2, value, div+1, end, compare); ^~~~~~~ main.cpp:16:63: error: 'compare' was not declared in this scope tree[index] = compare( tree[2*index + 1], tree[2*index+2] ); ^ main.cpp: At global scope: main.cpp:19:114: error: 'function' in namespace 'std' does not name a template type void query(std::vector<int>& tree, int index, int start, int finish, int left, int right, int& maxim, const std::function<int(int, int)>& compare) { ^~~~~~~~ main.cpp:19:122: error: expected ',' or '...' before '<' token void query(std::vector<int>& tree, int index, int start, int finish, int left, int right, int& maxim, const std::function<int(int, int)>& compare) { ^ main.cpp: In function 'void query(std::vector<int>&, int, int, int, int, int, int&, int)': main.cpp:21:43: error: 'compare' was not declared in this scope maxim = compare(maxim, tree[index]); ^ main.cpp:26:79: error: 'compare' was not declared in this scope if (start <= m) query(tree, 2 * index + 1, start, finish, left, m, maxim, compare); ^~~~~~~ main.cpp:27:89: error: 'compare' was not declared in this scope if (finish >= m + 1) query(tree, 2 * index + 2, start, finish, m + 1, right, maxim, compare); ^~~~~~~ main.cpp: At global scope: main.cpp:30:76: error: 'function' in namespace 'std' does not name a template type int query(std::vector<int>& tree, int begin, int end, int size, const std::function<int(int, int)>& comp, int defaultValue) { ^~~~~~~~ main.cpp:30:84: error: expected ',' or '...' before '<' token int query(std::vector<int>& tree, int begin, int end, int size, const std::function<int(int, int)>& comp, int defaultValue) { ^ main.cpp: In function 'int query(std::vector<int>&, int, int, int, int)': main.cpp:31:17: error: 'defaultValue' was not declared in this scope int maxim = defaultValue; ^~~~~~~~~~~~ main.cpp:32:48: error: 'comp' was not declared in this scope query(tree, 0, begin, end, 0, size, maxim, comp); ^~~~ main.cpp: At global scope: main.cpp:36:83: error: 'function' in namespace 'std' does not name a template type void update(std::vector<int>& tree, int position, int value, int size, const std::function<int(int, int)>& compare) { Non zero exit status: 1

Ceva nu functioneaza?