Borderou de evaluare (job #2119586)

Utilizator liviu2000Dragomirescu Liviu liviu2000 Data 1 februarie 2018 14:19:40
Problema Bibel Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:11:29: error: ‘int y0 [20]’ redeclared as different kind of symbol int x[20],y[20],x0[20],y0[20] ; ^ In file included from /usr/include/features.h:367:0, from /usr/include/assert.h:35, from /usr/include/c++/5/cassert:43, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:33, from user.cpp:1: /usr/include/bits/mathcalls.h:250:1: note: previous declaration ‘double y0(double)’ __MATHCALL (y0,, (_Mdouble_)); ^ user.cpp: In function ‘void hamilton()’: user.cpp:29:71: warning: pointer to a function used in arithmetic [-Wpointer-arith] dp[(1<<j)][j] = min(dp[(1<<j)][j],dp[0][i]+calc(x0[i],y0[i],x[j],y[j])) ; ^ user.cpp:29:71: error: invalid conversion from ‘double (*)(double) throw ()’ to ‘int’ [-fpermissive] user.cpp:13:5: note: initializing argument 2 of ‘int calc(int, int, int, int)’ int calc(int x1,int y1,int x2,int y2) ^ user.cpp:53:13: warning: pointer to a function used in arithmetic [-Wpointer-arith] y0[i] = y[i] ; ^ user.cpp:53:15: error: assignment of read-only location ‘*(y0 + ((sizetype)i))’ y0[i] = y[i] ; ^ user.cpp:53:15: error: cannot convert ‘int’ to ‘double(double) throw ()’ in assignment

Ceva nu functioneaza?