Borderou de evaluare (job #1594100)

Utilizator maria.sinteaMaria Sintea maria.sintea Data 9 februarie 2016 10:43:32
Problema Expresie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 80

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:14:35: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=] scanf("%d\n%d\n", &a[0], &a[1]); ^ user.cpp:14:35: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long int*’ [-Wformat=] user.cpp:21:28: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=] scanf("%d\n", &a[i]); ^ user.cpp:53:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘long long int’ [-Wformat=] printf("%ld\n",s); ^ user.cpp:7:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("expresie.in","r",stdin); ^ user.cpp:8:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("expresie.out","w",stdout); ^ user.cpp:12:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d\n", &n); ^ user.cpp:14:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d\n%d\n", &a[0], &a[1]); ^ user.cpp:21:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d\n", &a[i]); ^ user.cpp:50:33: warning: ‘nr3’ may be used uninitialized in this function [-Wmaybe-uninitialized] s=s-a[nr3]-a[nr3-1]-a[nr3-2]; ^ user.cpp:45:27: warning: ‘nr2’ may be used uninitialized in this function [-Wmaybe-uninitialized] s=s-a[nr1-1]-a[nr2-1]; ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms268kbOK10
20ms264kbOK10
30ms268kbOK10
40ms268kbOK10
50ms268kbOK10
60ms268kbOK10
70ms260kbIncorect0
80ms264kbIncorect0
90ms264kbOK10
100ms260kbOK10
Punctaj total80

Ceva nu functioneaza?