Borderou de evaluare (job #1600078)

Utilizator maria.sinteaMaria Sintea maria.sintea Data 14 februarie 2016 17:47:35
Problema Expresie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:12:22: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘int*’ [-Wformat=] scanf("%ld\n", &n); ^ user.cpp:14:37: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘long long int*’ [-Wformat=] scanf("%ld\n%ld\n", &a[0], &a[1]); ^ user.cpp:14:37: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 3 has type ‘long long int*’ [-Wformat=] user.cpp:21:29: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘long long int*’ [-Wformat=] scanf("%ld\n", &a[i]); ^ 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:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld\n", &n); ^ user.cpp:14:38: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld\n%ld\n", &a[0], &a[1]); ^ user.cpp:21:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld\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
10ms284kbOK10
20ms276kbOK10
30ms280kbOK10
40ms272kbOK10
50ms284kbOK10
60ms280kbOK10
70ms284kbOK10
80ms288kbOK10
90ms288kbOK10
100ms276kbOK10
Punctaj total100

Ceva nu functioneaza?