Borderou de evaluare (job #2188524)

Utilizator mihai50000Mihai-Cristian Popescu mihai50000 Data 27 martie 2018 10:42:59
Problema Zvon Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:14: error: ‘int time [100005]’ 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/32/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/6/32/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 user.cpp:1: /usr/include/time.h:192:15: note: previous declaration ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^~~~ user.cpp: In function ‘void init()’: user.cpp:19:9: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[i] = 0; ^ user.cpp:19:13: error: assignment of read-only location ‘*(time + ((sizetype)i))’ time[i] = 0; ^ user.cpp:19:13: error: cannot convert ‘int’ to ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ in assignment user.cpp: In function ‘void DFS(int, int)’: user.cpp:54:10: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[nod] = time[father[nod]] + grad; ^ user.cpp:54:30: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[nod] = time[father[nod]] + grad; ^ user.cpp:54:34: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[nod] = time[father[nod]] + grad; ^~~~ user.cpp:54:34: error: assignment of read-only location ‘*(time + ((sizetype)nod))’ user.cpp:54:34: error: cannot convert ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ in assignment user.cpp:55:27: warning: pointer to a function used in arithmetic [-Wpointer-arith] mx = get_max(mx, time[nod]); ^ user.cpp:55:27: error: invalid conversion from ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘int’ [-fpermissive] mx = get_max(mx, time[nod]); ~~~~~~~~^ user.cpp:33:5: note: initializing argument 2 of ‘int get_max(int, int)’ int get_max(int a, int b) ^~~~~~~ user.cpp:56:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < sons[nod].size(); i++) ~~^~~~~~~~~~~~~~~~~~

Ceva nu functioneaza?