Borderou de evaluare (job #3138085)

Utilizator thinkphpAdrian Statescu thinkphp Data 17 iunie 2023 13:02:31
Problema Perioada2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:13:14: warning: 'char* fgets(char*, int, FILE*)' writing 10000005 bytes into a region of size 10000004 overflows the destination [-Wstringop-overflow=] 13 | fgets(A + 1, NMAX, stdin); | ~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:5:6: note: at offset 1 into destination object 'A' of size 10000005 5 | char A[NMAX]; | ^ In file included from /usr/include/c++/12.2.1/cstdio:42, from main.cpp:1: /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:13:14: warning: 'char* fgets(char*, int, FILE*)' writing 10000005 bytes into a region of size 10000004 overflows the destination [-Wstringop-overflow=] 13 | fgets(A + 1, NMAX, stdin); | ~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:5:6: note: at offset 1 into destination object 'A' of size 10000005 5 | char A[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:13:14: warning: 'char* fgets(char*, int, FILE*)' writing 10000005 bytes into a region of size 10000004 overflows the destination [-Wstringop-overflow=] 13 | fgets(A + 1, NMAX, stdin); | ~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:5:6: note: at offset 1 into destination object 'A' of size 10000005 5 | char A[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 Punctaj/grupa
10ms303kbOK1010
21ms2654kbOK1010
339ms50335kbOK1010
419ms42315kbOK1030
519ms42274kbOK10
619ms42360kbOK10
724ms50278kbOK1040
819ms41996kbOK10
924ms47656kbOK10
1024ms44056kbOK10
Punctaj total100

Ceva nu functioneaza?