Borderou de evaluare (job #3271344)

Utilizator GabyXBBabiuc Eduard Gabriel GabyXB Data 25 ianuarie 2025 19:16:06
Problema Lowest Common Ancestor Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:17:5: error: 'int time' redeclared as different kind of entity 17 | 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/istream:38, from /usr/include/c++/12.2.1/fstream:38, 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 'void citire()': main.cpp:21:13: warning: unused variable 'y' [-Wunused-variable] 21 | int x , y; | ^ main.cpp: In function 'void build_table()': main.cpp:33:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 33 | for(int i = 1; (1<<i) < time ; i++) | ~~~~~~~^~~~~~ main.cpp:34:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 34 | for(int j = 1 ; j + (1<<i) - 1 <=time ; j++) | ~~~~~~~~~~~~~~~^~~~~~ main.cpp: In function 'void afisare()': main.cpp:45:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 45 | for(int i = 0; (1<<i) < time ; i++ , cout << '\n') | ~~~~~~~^~~~~~ main.cpp:46:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 46 | for(int j = 1 ; j + (1<<i) - 1 <=time ; j++) | ~~~~~~~~~~~~~~~^~~~~~ main.cpp: In function 'void dfs(int, int)': main.cpp:59:12: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith] 59 | m[0][++time] = nod; | ^~~~ main.cpp:59:12: error: lvalue required as increment operand main.cpp:62:15: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive] 62 | fa[nod] = time; | ^~~~ | | | time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept} main.cpp:63:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 63 | for(int i = 0 ; i<G[nod].size() ; i++) | ~^~~~~~~~~~~~~~ main.cpp:67:20: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith] 67 | m[0][++time] = nod; | ^~~~ main.cpp:67:20: error: lvalue required as increment operand Non zero exit status: 1

Ceva nu functioneaza?