Borderou de evaluare (job #3122151)

Utilizator Ilie_MityIlie Dumitru Ilie_Mity Data 17 aprilie 2023 14:40:19
Problema Subsir Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 50

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:85:14: warning: 'char* fgets(char*, int, FILE*)' writing 512 bytes into a region of size 511 overflows the destination [-Wstringop-overflow=] 85 | fgets(s[0]+1, NMAX, f); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:29:6: note: at offset 1 into destination object 's' of size 512 29 | char s[2][NMAX]; | ^ In file included from /usr/include/c++/12.2.1/cstdio:42, from main.cpp:2: /usr/include/stdio.h:592:14: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)' 592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~ main.cpp:86:14: warning: 'char* fgets(char*, int, FILE*)' writing 512 bytes into a region of size 511 overflows the destination [-Wstringop-overflow=] 86 | fgets(s[1]+1, NMAX, f); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:29:6: note: at offset 513 into destination object 's' of size 1024 29 | char s[2][NMAX]; | ^ /usr/include/stdio.h:592:14: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)' 592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~ main.cpp:86:14: warning: 'char* fgets(char*, int, FILE*)' writing 512 bytes into a region of size 511 overflows the destination [-Wstringop-overflow=] 86 | fgets(s[1]+1, NMAX, f); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:29:6: note: at offset 513 into destination object 's' of size 1024 29 | char s[2][NMAX]; | ^ /usr/include/stdio.h:592:14: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)' 592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~ main.cpp:86:14: warning: 'char* fgets(char*, int, FILE*)' writing 512 bytes into a region of size 511 overflows the destination [-Wstringop-overflow=] 86 | fgets(s[1]+1, NMAX, f); | ~~~~~^~~~~~~~~~~~~~~~~ main.cpp:29:6: note: at offset 513 into destination object 's' of size 1024 29 | char s[2][NMAX]; | ^ /usr/include/stdio.h:592:14: note: in a call to function 'char* fgets(char*, int, FILE*)' declared with attribute 'access (write_only, 1, 2)' 592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
12ms557kbOk!10
20ms1081kbOk!10
30ms557kbOk!10
40ms557kbOk!10
50ms303kbOk!10
629ms17702kbTime limit exceeded0
728ms25387kbTime limit exceeded0
829ms2744kbTime limit exceeded0
929ms1310kbTime limit exceeded0
1029ms1736kbTime limit exceeded0
Punctaj total50

Ceva nu functioneaza?