Borderou de evaluare (job #696890)

Utilizator avatar ScarlatescuRazvan ScarlatescuRazvan ScarlatescuRazvan IP ascuns
Problemă Unific (clasa a 7-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 18 feb. 2023 13:43:39 Scor 7

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:17:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=] 17 | scanf("%d", &a[i]); | ~^ ~~~~~ | | | | | long long int* | int* | %lld main.cpp:26:13: warning: unused variable 'k' [-Wunused-variable] 26 | int k = 0; | ^ main.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 10 | freopen("unific.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:11:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 11 | freopen("unific.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 14 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ main.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 17 | scanf("%d", &a[i]); | ~~~~~^~~~~~~~~~~~~ main.cpp:21:14: warning: iteration 20 invokes undefined behavior [-Waggressive-loop-optimizations] 21 | f[i] = 0; | ~~~~~^~~ main.cpp:20:22: note: within this loop 20 | for(int i = 0;i <= 20;i++) { | ~~^~~~~ main.cpp:21:14: warning: 'void* __builtin_memset(void*, int, unsigned int)' forming offset [80, 83] is out of the bounds [0, 80] of object 'f' with type 'int [20]' [-Warray-bounds] 21 | f[i] = 0; | ~~~~~^~~ main.cpp:5:5: note: 'f' declared here 5 | int f[20]; | ^ main.cpp:21:14: warning: 'void* __builtin_memset(void*, int, unsigned int)' forming offset [80, 83] is out of the bounds [0, 80] of object 'f' with type 'int [20]' [-Warray-bounds] 21 | f[i] = 0; | ~~~~~^~~ main.cpp:5:5: note: 'f' declared here 5 | int f[20]; | ^
Test Timp execuție Memorie folosită Mesaj Punctaj/test
1 1 ms 114 kb Incorect 0
2 1 ms 114 kb a) corect b) incorect 1
3 1 ms 249 kb a) corect b) incorect 1
4 1 ms 118 kb Incorect 0
5 48 ms 770 kb a) corect b) incorect 1
6 78 ms 901 kb Incorect 0
7 67 ms 901 kb a) corect b) incorect 1
8 71 ms 897 kb a) corect b) incorect 1
9 72 ms 905 kb a) corect b) incorect 1
10 1 ms 114 kb a) corect b) incorect 1
Punctaj total 7