Borderou de evaluare (job #2350765)
| Utilizator | Data | 21 februarie 2019 18:17:02 | |
|---|---|---|---|
| Problema | Project management | Status | done |
| Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:15:14: error: 'int time [110]' redeclared as different kind of symbol
int time[NMAX];
^
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/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:3:
/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()':
main.cpp:30:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
dp1[i] = time[i];
^
main.cpp:30:28: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
dp1[i] = time[i];
~~~~~~^
main.cpp:37:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (dp1[node] + time[nghb] > dp1[nghb]) {
^
main.cpp:37:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:37:50: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (dp1[node] + time[nghb] > dp1[nghb]) {
^
main.cpp:38:50: warning: pointer to a function used in arithmetic [-Wpointer-arith]
dp1[nghb] = dp1[node] + time[nghb];
^
main.cpp:38:50: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:38:39: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
dp1[nghb] = dp1[node] + time[nghb];
~~~~~~~~~~^~~~~~~~~~~~
main.cpp: In function 'void dfs(int, int)':
main.cpp:49:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (sol - val - time[nghb] < dp2[nghb])
^
main.cpp:49:23: error: invalid operands of types 'int' and 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' to binary 'operator-'
if (sol - val - time[nghb] < dp2[nghb])
~~~~~~~~~~^~~~~~~~~~~~
main.cpp:50:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
dfs(nghb, val + time[nghb]);
^
main.cpp:50:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:50:27: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
dfs(nghb, val + time[nghb]);
~~~~^~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
