Borderou de evaluare (job #3289564)

Utilizator AsandeiStefanAsandei Stefan-Alexandru AsandeiStefan Data 27 martie 2025 14:27:29
Problema Inv Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:28:3: error: 'vector' does not name a type 28 | vector<uint64_t> tree; | ^~~~~~ main.cpp: In constructor 'FenwickTree::FenwickTree(int)': main.cpp:11:31: error: 'tree' was not declared in this scope; did you mean 'free'? 11 | FenwickTree(int n) : n(n) { tree = vector<uint64_t>(n + 1, 0); } | ^~~~ | free main.cpp:11:38: error: 'vector' was not declared in this scope 11 | FenwickTree(int n) : n(n) { tree = vector<uint64_t>(n + 1, 0); } | ^~~~~~~~~~~~~~~~ main.cpp:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 3 | #include <unordered_map> +++ |+#include <vector> 4 | main.cpp: In member function 'void FenwickTree::update(int, int)': main.cpp:14:16: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'} [-Wsign-compare] 14 | for (; pos <= n; pos += pos & (-pos)) | ~~~~^~~~ main.cpp:15:7: error: 'tree' was not declared in this scope; did you mean 'free'? 15 | tree[pos] += value; | ^~~~ | free main.cpp: In member function 'uint64_t FenwickTree::query(int)': main.cpp:21:14: error: 'tree' was not declared in this scope; did you mean 'free'? 21 | ans += tree[pos]; | ^~~~ | free main.cpp: In function 'int main()': main.cpp:39:22: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'} [-Wsign-compare] 39 | for (auto i = 1; i <= n; i++) { | ~~^~~~ main.cpp:46:22: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'} [-Wsign-compare] 46 | for (auto i = 1; i <= n; i++) { | ~~^~~~ main.cpp:52:22: warning: comparison of integer expressions of different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'} [-Wsign-compare] 52 | for (auto i = 1; i <= n; i++) { | ~~^~~~ Non zero exit status: 1

Ceva nu functioneaza?