Borderou de evaluare (job #1602346)

Utilizator Alexa2001Alexa Tudose Alexa2001 Data 16 februarie 2016 18:50:04
Problema Sobo Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 40

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:47:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] printf("%d\n",d[(1<<n)-1]); ^ user.cpp:35:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sobo.in","r",stdin); ^ user.cpp:36:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sobo.out","w",stdout); ^ user.cpp:38:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d\n",&n,&l); ^ user.cpp:40:32: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result] for(i=0;i<n;++i) gets(a[i]); ^ user.cpp:41:42: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(i=0;i<l;++i) scanf("%d",&cost[i]); ^ In file included from /usr/include/stdio.h:934:0, from /usr/include/c++/4.8/cstdio:42, from user.cpp:1: In function ‘char* gets(char*)’, inlined from ‘int main()’ at user.cpp:40:32: /usr/include/i386-linux-gnu/bits/stdio2.h:230:28: warning: call to ‘__gets_warn’ declared with attribute warning: please use fgets or getline instead, gets can't specify buffer size [enabled by default] return __gets_warn (__str); ^ /tmp/ccGkgzXU.o: In function `main': user.cpp:(.text.startup+0x87): warning: the `gets' function is dangerous and should not be used.
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms288kbCool!10
20ms292kbCool!10
30ms288kbCool!10
460ms296kbCool!10
50ms296kbKilled by signal 11(SIGSEGV).0
60ms280kbKilled by signal 11(SIGSEGV).0
70ms276kbKilled by signal 11(SIGSEGV).0
80ms276kbKilled by signal 11(SIGSEGV).0
90ms280kbKilled by signal 11(SIGSEGV).0
100ms272kbKilled by signal 11(SIGSEGV).0
Punctaj total40

Ceva nu functioneaza?