Borderou de evaluare (job #1559817)

Utilizator DrumeaVDrumea Vasile DrumeaV Data 31 decembrie 2015 16:40:56
Problema Zoo Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:19:8: error: ‘int y1’ redeclared as different kind of symbol int x1,y1,x2,y2; ^ In file included from /usr/include/features.h:357:0, from /usr/include/stdio.h:28, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’ __MATHCALL (y1,, (_Mdouble_)); ^ user.cpp: In function ‘int query(int, int, int, int, int)’: user.cpp:67:50: error: invalid types ‘int [32768][double(double)throw ()]’ for array subscript if (p1 > 0 && tree[lvl][p1] == tree[1][y1]) ^ user.cpp: In function ‘int main()’: user.cpp:119:45: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d %d %d %d",&x1,&y1,&x2,&y2); ^ user.cpp:121:81: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if (x1 > sortx[n] || x2 < sortx[1] || y2 < tree[1][1] || y1 > tree[1][n]) ^ user.cpp:129:31: warning: pointer to a function used in arithmetic [-Wpointer-arith] y1 = bs(tree[1],y1 - 1) + 1; ^ user.cpp:129:29: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive] y1 = bs(tree[1],y1 - 1) + 1; ^ user.cpp:43:5: error: initializing argument 2 of ‘int bs(int*, int)’ [-fpermissive] int bs(int A[],int val) ^ user.cpp:129:13: error: assignment of function ‘double y1(double)’ y1 = bs(tree[1],y1 - 1) + 1; ^ user.cpp:129:13: error: cannot convert ‘int’ to ‘double(double)throw ()’ in assignment user.cpp:132:41: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive] printf("%d\n",query(1,1,n,y1,y2)); ^ user.cpp:55:5: error: initializing argument 4 of ‘int query(int, int, int, int, int)’ [-fpermissive] int query(int lvl,int l,int r,int p1,int p2) ^ user.cpp:93:32: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("zoo.in","r",stdin); ^ user.cpp:94:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("zoo.out","w",stdout); ^ user.cpp:96:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ user.cpp:99:42: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d",&ar[i].x,&ar[i].y);

Ceva nu functioneaza?