Borderou de evaluare (job #1226168)

Utilizator akaprosAna Kapros akapros Data 4 septembrie 2014 17:56:57
Problema Matricen Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:4:24: error: ‘int y1’ redeclared as different kind of symbol int n,i,j,p,q,nr,x1,x2,y1,y2; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, 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 main()’: user.cpp:22:44: 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:23:31: warning: pointer to a function used in arithmetic [-Wpointer-arith] nr=c[x2][y2]-c[x2][y1-1]-c[x1-1][y2]+c[x1-1][y1-1]; ^ user.cpp:23:32: error: invalid types ‘int [305][double (*)(double)throw ()]’ for array subscript nr=c[x2][y2]-c[x2][y1-1]-c[x1-1][y2]+c[x1-1][y1-1]; ^ user.cpp:23:57: warning: pointer to a function used in arithmetic [-Wpointer-arith] nr=c[x2][y2]-c[x2][y1-1]-c[x1-1][y2]+c[x1-1][y1-1]; ^ user.cpp:23:58: error: invalid types ‘int [305][double (*)(double)throw ()]’ for array subscript nr=c[x2][y2]-c[x2][y1-1]-c[x1-1][y2]+c[x1-1][y1-1]; ^ user.cpp:24:20: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ if (nr%(y2-y1+1)==0) ^ user.cpp:25:45: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ printf("%d\n",min(nr,((x2-x1+1)*(y2-y1+1))-nr)/2); ^ user.cpp:8:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("matricen.in","r",stdin); ^ user.cpp:9:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("matricen.out","w",stdout); ^ user.cpp:10:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d",&n,&q); ^ user.cpp:15:33: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i][j]); ^ user.cpp:22:45: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d %d",&x1,&y1,&x2,&y2); ^

Ceva nu functioneaza?