Borderou de evaluare (job #1214201)

Utilizator geniucosOncescu Costin geniucos Data 29 iulie 2014 19:44:50
Problema Matricen Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:4:22: error: ‘int j1’ redeclared as different kind of symbol int nr,sol,sum,i1,i2,j1,j2,i,j,n,Q,s[309][309],a[309][309],v[309]; ^ 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:240:1: error: previous declaration of ‘double j1(double)’ __MATHCALL (j1,, (_Mdouble_)); ^ user.cpp: In function ‘int main()’: user.cpp:17:37: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d%d%d%d",&i1,&j1,&i2,&j2); ^ user.cpp:21:34: warning: pointer to a function used in arithmetic [-Wpointer-arith] v[++nr]=s[i][j2]-s[i][j1-1],sum+=v[nr]; ^ user.cpp:21:35: error: invalid types ‘int [309][double (*)(double)throw ()]’ for array subscript v[++nr]=s[i][j2]-s[i][j1-1],sum+=v[nr]; ^ user.cpp:22:16: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ if(sum%(j2-j1+1)!=0) printf("-1\n"); ^ user.cpp:27:32: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ for(i=nr;i>=nr-sum/(j2-j1+1)+1;i--) ^ user.cpp:28:21: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator-’ sol+=j2-j1+1-v[i]; ^ user.cpp:7:33: 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:8:35: 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:9:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ user.cpp:10:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&Q); ^ user.cpp:13:55: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i][j]),s[i][j]=s[i][j-1]+a[i][j]; ^ user.cpp:17:38: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d%d",&i1,&j1,&i2,&j2); ^

Ceva nu functioneaza?