Borderou de evaluare (job #1617837)

Utilizator alex72101Sfat Alexandru alex72101 Data 27 februarie 2016 16:38:26
Problema Granita Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 10

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:35:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long int*’ [-Wformat=] fscanf(f,"%d",&n); ^ user.cpp:37:43: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=] fscanf(f,"%d %d",&v[i][0],&v[i][1]); ^ user.cpp:37:43: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘long long int*’ [-Wformat=] user.cpp:47:21: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] fprintf(g,"%d",k); ^ user.cpp:35:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d",&n); ^ user.cpp:37:44: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d %d",&v[i][0],&v[i][1]); ^ user.cpp:43:62: warning: ‘k’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (v[i][1]<=v[ref][1] || (v[ref][0]==v[i][0])) { k++; if (v[i][1]>v[ref][1]) ref=i; } ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms268kbIncorect0
20ms264kbIncorect0
34ms416kbIncorect0
48ms512kbIncorect0
58ms504kbIncorect0
68ms504kbIncorect0
78ms512kbOK10
88ms512kbIncorect0
98ms512kbIncorect0
108ms516kbIncorect0
Punctaj total10

Ceva nu functioneaza?