Borderou de evaluare (job #1417958)

Utilizator gabimoiseMoise Gabriel gabimoise Data 11 aprilie 2015 15:41:48
Problema Purice2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:43:37: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] if (rez==1) printf("%ld\n",1); ^ user.cpp:44:34: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else printf("%ld\n",0);} ^ user.cpp:45:40: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else if (k==1) printf("%ld\n",0); ^ user.cpp:46:58: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else if (k==2) if (z[2]-z[1]==1) printf("%ld\n",1); ^ user.cpp:47:54: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else printf("%ld\n",0); ^ user.cpp:46:17: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] else if (k==2) if (z[2]-z[1]==1) printf("%ld\n",1); ^ user.cpp:25:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("purice2.in","r",stdin); ^ user.cpp:26:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("purice2.out","w",stdout); ^ user.cpp:27:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld",&t); ^ user.cpp:30:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld",&n); ^ user.cpp:31:46: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for (i=1;i<=n;i++) scanf("%ld",&v[i]); ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms440kbOK10
20ms440kbOK10
30ms444kbOK10
40ms440kbOK10
50ms436kbOK10
60ms440kbOK10
70ms444kbOK10
80ms440kbOK10
90ms444kbOK10
100ms444kbOK10
Punctaj total100

Ceva nu functioneaza?