Borderou de evaluare (job #2658023)

Utilizator MarcGrecMarc Grec MarcGrec Data 12 octombrie 2020 22:29:27
Problema Arbori de intervale Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:3: error: 'size_t' does not name a type size_t a, b; ^~~~~~ main.cpp:34:19: error: 'size_t' has not been declared void UpdateValue(size_t index, const T& val) ^~~~~~ main.cpp:41:16: error: 'size_t' has not been declared void GetRange(size_t a, size_t b, T** out) ^~~~~~ main.cpp:41:26: error: 'size_t' has not been declared void GetRange(size_t a, size_t b, T** out) ^~~~~~ main.cpp:54:27: error: 'size_t' does not name a type void ConstructTree(const size_t a, const size_t b, Node** node) ^~~~~~ main.cpp:54:43: error: 'size_t' does not name a type void ConstructTree(const size_t a, const size_t b, Node** node) ^~~~~~ main.cpp:153:25: error: 'size_t' has not been declared T GetRange(Node* node, size_t a, size_t b) ^~~~~~ main.cpp:153:35: error: 'size_t' has not been declared T GetRange(Node* node, size_t a, size_t b) ^~~~~~ main.cpp: In member function 'void IntervalTree<T, TFunc>::ConstructTree(int, int, IntervalTree<T, TFunc>::Node**)': main.cpp:74:11: error: 'size_t' does not name a type const size_t mean = (a + b) / 2; ^~~~~~ main.cpp:79:23: error: 'mean' was not declared in this scope ConstructTree(a, mean, &left); ^~~~ main.cpp:89:20: error: 'mean' was not declared in this scope ConstructTree(mean + 1, b, &right); ^~~~ main.cpp: In instantiation of 'void IntervalTree<T, TFunc>::GetRange(int, int, T**) [with T = int; TFunc = int (*)(int, int)]': main.cpp:258:35: required from here main.cpp:43:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((a <= b) && (b < leaves.size())) ~~~^~~~~~~~~~~~~~~~ main.cpp: In instantiation of 'void IntervalTree<T, TFunc>::ConstructTree(int, int, IntervalTree<T, TFunc>::Node**) [with T = int; TFunc = int (*)(int, int)]': main.cpp:24:16: required from 'IntervalTree<T, TFunc>::IntervalTree(const std::vector<T>&, TFunc) [with T = int; TFunc = int (*)(int, int)]' main.cpp:246:131: required from here main.cpp:62:13: error: 'struct IntervalTree<int, int (*)(int, int)>::Node' has no member named 'a' (*node)->a = a; ~~~~~~~~~^ main.cpp:64:13: error: 'struct IntervalTree<int, int (*)(int, int)>::Node' has no member named 'b' (*node)->b = b; ~~~~~~~~~^ main.cpp: In instantiation of 'T IntervalTree<T, TFunc>::GetRange(IntervalTree<T, TFunc>::Node*, int, int) [with T = int; TFunc = int (*)(int, int)]': main.cpp:45:27: required from 'void IntervalTree<T, TFunc>::GetRange(int, int, T**) [with T = int; TFunc = int (*)(int, int)]' Non zero exit status: 1

Ceva nu functioneaza?