Borderou de evaluare (job #2705013)

Utilizator IRadu1529Radu Ionescu IRadu1529 Data 11 februarie 2021 19:48:46
Problema Project management Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:18:20: error: 'std::pair<int, int> time' redeclared as different kind of symbol pair<int, int> time(N); ^ In file included from /usr/include/pthread.h:24:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148, from /usr/include/c++/6/ext/atomicity.h:35, from /usr/include/c++/6/bits/ios_base.h:39, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:1: /usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)' extern time_t time (time_t *__timer) __THROW; ^~~~ main.cpp: In function 'void bfs(int)': main.cpp:28:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < g2[top].size(); i++) m = max(m, time[g2[top][i]].first); ~~^~~~~~~~~~~~~~~~ main.cpp:28:70: warning: pointer to a function used in arithmetic [-Wpointer-arith] for (int i = 0; i < g2[top].size(); i++) m = max(m, time[g2[top][i]].first); ^ main.cpp:28:72: error: request for member 'first' in '*(time + ((sizetype)g2[top].std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)i))))', which is of non-class type 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' for (int i = 0; i < g2[top].size(); i++) m = max(m, time[g2[top][i]].first); ^~~~~ main.cpp:30:11: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[top].first = max(m + d[top], time[top].first); ^ main.cpp:30:13: error: request for member 'first' in '*(time + ((sizetype)top))', which is of non-class type 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' time[top].first = max(m + d[top], time[top].first); ^~~~~ main.cpp:30:45: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[top].first = max(m + d[top], time[top].first); ^ main.cpp:30:47: error: request for member 'first' in '*(time + ((sizetype)top))', which is of non-class type 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' time[top].first = max(m + d[top], time[top].first); ^~~~~ main.cpp:32:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < g[top].size(); i++) drum.push(g[top][i]); ~~^~~~~~~~~~~~~~~ main.cpp: In function 'void bfs2(int)': main.cpp:43:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < g[top].size(); i++) m = min(m, time[g[top][i]].second - time[g[top][i]].first); ~~^~~~~~~~~~~~~~~ main.cpp:43:68: warning: pointer to a function used in arithmetic [-Wpointer-arith] for (int i = 0; i < g[top].size(); i++) m = min(m, time[g[top][i]].second - time[g[top][i]].first); ^ main.cpp:43:70: error: request for member 'second' in '*(time + ((sizetype)g[top].std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)i))))', which is of non-class type 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' for (int i = 0; i < g[top].size(); i++) m = min(m, time[g[top][i]].second - time[g[top][i]].first); ^~~~~~ Non zero exit status: 1

Ceva nu functioneaza?