Borderou de evaluare (job #2319264)

Utilizator vladcoroian2001Vlad Coroian vladcoroian2001 Data 13 ianuarie 2019 21:09:44
Problema Snake Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:32: error: 'int y1' redeclared as different kind of symbol int n,m,l,A[NMAX][NMAX],x,y,x1,y1,x2,y2; ^~ In file included from /usr/include/features.h:367:0, from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507, from /usr/include/c++/6/iosfwd:38, from /usr/include/c++/6/ios:38, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from main.cpp:1: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ main.cpp: In function 'int main()': main.cpp:45:16: error: assignment of function 'double y1(double)' y1=Q.front().second; ^~~~~~ main.cpp:45:16: error: cannot convert 'int' to 'double(double) throw ()' in assignment main.cpp:50:28: error: invalid types 'int [105][double(double) throw ()]' for array subscript if(abs(A[x2][y2]-A[x1][y1])==1) continue; ^ main.cpp:51:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(x1==x2 || y1==y2) ^~ main.cpp:52:21: warning: pointer to a function used in arithmetic [-Wpointer-arith] A[(x1+x2)/2][(y1+y2)/2]=(A[x1][y1]+A[x2][y2])/2; ^~ main.cpp:52:24: error: invalid operands of types 'double (*)(double) throw ()' and 'int' to binary 'operator/' A[(x1+x2)/2][(y1+y2)/2]=(A[x1][y1]+A[x2][y2])/2; ~~~~~~~^~ main.cpp:52:37: error: invalid types 'int [105][double(double) throw ()]' for array subscript A[(x1+x2)/2][(y1+y2)/2]=(A[x1][y1]+A[x2][y2])/2; ^ main.cpp:53:44: error: invalid types 'int [105][double(double) throw ()]' for array subscript else if(A[x1][y2]==0) A[x1][y2]=(A[x1][y1]+A[x2][y2])/2; ^ main.cpp:54:16: error: invalid types 'int [105][double(double) throw ()]' for array subscript else A[x2][y1]=(A[x1][y1]+A[x2][y2])/2; ^ main.cpp:54:27: error: invalid types 'int [105][double(double) throw ()]' for array subscript else A[x2][y1]=(A[x1][y1]+A[x2][y2])/2; ^ Non zero exit status: 1

Ceva nu functioneaza?