Borderou de evaluare (job #1381257)

Utilizator gabimoiseMoise Gabriel gabimoise Data 8 martie 2015 11:54:18
Problema Purice2 Status done
Runda Algoritmiada 2015 - Runda 2, Juniori Compilator cpp | Vezi sursa
Scor 30

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:42: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:43:34: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else printf("%ld\n",0);} ^ user.cpp:44: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:45:58: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else if (k==2) if (x[2]-x[1]==1) printf("%ld\n",1); ^ user.cpp:46:54: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] else printf("%ld\n",0); ^ user.cpp:45:17: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] else if (k==2) if (x[2]-x[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]); ^
Feedback Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms440kbOK10
20ms448kbOK10
30ms444kbOK10
40ms444kbIncorect0
50ms444kbIncorect0
60ms444kbIncorect0
70ms448kbIncorect0
80ms444kbIncorect0
90ms444kbIncorect0
100ms444kbIncorect0
Punctaj total30

Ceva nu functioneaza?