Borderou de evaluare (job #3191599)

Utilizator oskar01oskar the boss oskar01 Data 10 ianuarie 2024 09:20:29
Problema GrEA Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:5:40: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas] 5 | #pragma GCC optimize("O3, unroll-loops") | ^ main.cpp:17:14: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes] 17 | Info() = default; | ^~~~~~~ main.cpp:18:28: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes] 18 | Info(int node, int cost) : node(node), cost(cost) {} | ^ main.cpp:24:11: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes] 24 | void read() { | ^ main.cpp:36:81: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes] 36 | int bsLowerBound_idx(vector<int> &valid_pos, int &idx_startFrom, int relativePos) { | ^ main.cpp: In function 'int bsLowerBound_idx(std::vector<int>&, int&, int)': main.cpp:37:41: error: base operand of '->' has non-pointer type 'std::vector<int>' 37 | int l = idx_startFrom, r = valid_pos->size()-1, mid, rs = -1; | ^~ main.cpp:39:9: error: 'mid' was not declared in this scope 39 | mid = l + ( r - l ) / 2; | ^~~ main.cpp:40:14: error: no match for 'operator*' (operand type is 'std::vector<int>') 40 | if( (*valid_pos)[mid] >= relativePos ) { | ^~~~~~~~~~ main.cpp:41:13: error: 'rs' was not declared in this scope; did you mean 'r'? 41 | rs = mid; | ^~ | r main.cpp:48:12: error: 'rs' was not declared in this scope; did you mean 'r'? 48 | return rs; | ^~ | r main.cpp: At global scope: main.cpp:51:12: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes] 51 | void solve() { | ^ main.cpp: In function 'void solve()': main.cpp:55:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 55 | for(int i=1;i<v[1].size();i++) { | ~^~~~~~~~~~~~ main.cpp:61:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 61 | for(int i=1;i<v[2].size();i++) { | ~^~~~~~~~~~~~ main.cpp:92:43: error: invalid initialization of non-const reference of type 'std::vector<int>&' from an rvalue of type 'std::vector<int>*' 92 | int bs_pos = bsLowerBound_idx(&validPos1, idx1, lowestAccessiblePos); | ^~~~~~~~~~ main.cpp:36:35: note: in passing argument 1 of 'int bsLowerBound_idx(std::vector<int>&, int&, int)' 36 | int bsLowerBound_idx(vector<int> &valid_pos, int &idx_startFrom, int relativePos) { | ~~~~~~~~~~~~~^~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?