Borderou de evaluare (job #1514264)

Utilizator radu.leonardoThe Doctor radu.leonardo Data 30 octombrie 2015 21:54:28
Problema Fence Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=] scanf("%d %d %d %d %d %d %d %d\n",&ceri,&nl,&nc,&pret,&cn,&cs,&lv,&le); ^ user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 5 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 6 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 7 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 8 has type ‘short int*’ [-Wformat=] user.cpp:7:71: warning: format ‘%d’ expects argument of type ‘int*’, but argument 9 has type ‘short int*’ [-Wformat=] user.cpp:9:34: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘short int*’ [-Wformat=] for(j=1;j<=nc;j++){scanf("%d ",&x);a[i][j]=x-pret;if (i<lv && j<cn);else if(i<le && j>cn);else if(i>lv && j<cs);else if(i>le && j>cs);else smax+=a[i][j];} ^ user.cpp:17:53: error: ‘max’ was not declared in this scope for(j=nc-1;j>=cs+1;j--) b[j]=max(b[j+1],b[j]); ^ user.cpp:27:48: error: ‘max’ was not declared in this scope for(j=2;j<=cn;j++) b[j]=max(b[j-1],b[j]); ^ user.cpp:38:53: error: ‘max’ was not declared in this scope for(j=nc-1;j>=cn+1;j--) b[j]=max(b[j+1],b[j]); ^ user.cpp:48:50: error: ‘max’ was not declared in this scope for(j=2;j<=cs-1;j++) b[j]=max(b[j-1],b[j]); ^ user.cpp:52:23: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] printf("%I64d\n",smax); ^ user.cpp:6:31: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] {freopen("fence.in","r",stdin);freopen("fence.out","w",stdout); ^ user.cpp:6:63: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] {freopen("fence.in","r",stdin);freopen("fence.out","w",stdout); ^ user.cpp:7:72: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d %d %d %d %d %d\n",&ceri,&nl,&nc,&pret,&cn,&cs,&lv,&le); ^ user.cpp:9:35: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(j=1;j<=nc;j++){scanf("%d ",&x);a[i][j]=x-pret;if (i<lv && j<cn);else if(i<le && j>cn);else if(i>lv && j<cs);else if(i>le && j>cs);else smax+=a[i][j];} ^

Ceva nu functioneaza?