Borderou de evaluare (job #3213093)

Utilizator nicholas9onicaOnica Nicholas Andrei nicholas9onica Data 12 martie 2024 15:11:37
Problema Lanterna Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:27:13: error: 'std::vector<int> time' redeclared as different kind of entity 27 | vector<int> time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:35, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/gthr.h:148, from /usr/include/c++/12.2.1/ext/atomicity.h:35, from /usr/include/c++/12.2.1/bits/ios_base.h:39, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/ostream:38, from /usr/include/c++/12.2.1/iostream:39, from main.cpp:1: /usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)' 76 | extern time_t time (time_t *__timer) __THROW; | ^~~~ main.cpp: In function 'int dijkstra(int)': main.cpp:41:15: warning: pointer to a function used in arithmetic [-Wpointer-arith] 41 | time[i] = NMAX; | ^ main.cpp:41:17: error: assignment of read-only location '*(time + ((sizetype)i))' 41 | time[i] = NMAX; | ~~~~~~~~^~~~~~ main.cpp:56:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] 56 | if (frn.t > time[frn.nod]) | ^ main.cpp:56:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 56 | if (frn.t > time[frn.nod]) | ~~~~~~^~~~~~~~~~~~~~~ main.cpp:63:30: warning: pointer to a function used in arithmetic [-Wpointer-arith] 63 | if ((time[frn.nod] + vecin.t < time[vecin.nod]) && nr_wac>=vecin.w) | ^ main.cpp:63:32: warning: pointer to a function used in arithmetic [-Wpointer-arith] 63 | if ((time[frn.nod] + vecin.t < time[vecin.nod]) && nr_wac>=vecin.w) | ~~~~~~~~~~~~~~^~~~~~~~~ main.cpp:63:58: warning: pointer to a function used in arithmetic [-Wpointer-arith] 63 | if ((time[frn.nod] + vecin.t < time[vecin.nod]) && nr_wac>=vecin.w) | ^ main.cpp:65:31: warning: pointer to a function used in arithmetic [-Wpointer-arith] 65 | time[vecin.nod] = time[frn.nod] + vecin.t; | ^ main.cpp:65:47: warning: pointer to a function used in arithmetic [-Wpointer-arith] 65 | time[vecin.nod] = time[frn.nod] + vecin.t; | ^ main.cpp:65:49: warning: pointer to a function used in arithmetic [-Wpointer-arith] 65 | time[vecin.nod] = time[frn.nod] + vecin.t; | ~~~~~~~~~~~~~~^~~~~~~~~ main.cpp:65:33: error: assignment of read-only location '*(time + ((sizetype)vecin.edge::nod))' 65 | time[vecin.nod] = time[frn.nod] + vecin.t; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:75:40: warning: pointer to a function used in arithmetic [-Wpointer-arith] Non zero exit status: 1

Ceva nu functioneaza?