Borderou de evaluare (job #2956114)

Utilizator Antonia_onisoruantonia onisoru Antonia_onisoru Data 18 decembrie 2022 16:24:59
Problema Bitonic Status done
Runda ACM pe echipe Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:48:47: warning: operation on 'small_st[i]' may be undefined [-Wsequence-point] 48 | cresc_st[i] = cresc_dr[i] = small_st[i] = small_st[i] = 0; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ main.cpp:36:19: warning: unused variable 'dist' [-Wunused-variable] 36 | int n, t, i, q, dist, maxim, d1, d2; | ^~~~ main.cpp:36:32: warning: unused variable 'd1' [-Wunused-variable] 36 | int n, t, i, q, dist, maxim, d1, d2; | ^~ main.cpp:36:36: warning: unused variable 'd2' [-Wunused-variable] 36 | int n, t, i, q, dist, maxim, d1, d2; | ^~ main.cpp:48:61: warning: iteration 1000 invokes undefined behavior [-Waggressive-loop-optimizations] 48 | cresc_st[i] = cresc_dr[i] = small_st[i] = small_st[i] = 0; | ~~~~~~~~~~~~^~~ main.cpp:47:18: note: within this loop 47 | for(i = 0; i < 1001; i++) { | ~~^~~~~~ main.cpp:48:61: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'small_st' with type 'int [1000]' [-Warray-bounds] 48 | cresc_st[i] = cresc_dr[i] = small_st[i] = small_st[i] = 0; | ~~~~~~~~~~~~^~~ main.cpp:6:5: note: 'small_st' declared here 6 | int small_st[1000], small_dr[1000], big_st[1000], big_dr[1000]; | ^~~~~~~~ main.cpp:49:51: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'big_dr' with type 'int [1000]' [-Warray-bounds] 49 | dc_st[i] = dc_dr[i] = big_st[i] = big_dr[i] = 0; | ~~~~~~~~~~^~~ main.cpp:6:51: note: 'big_dr' declared here 6 | int small_st[1000], small_dr[1000], big_st[1000], big_dr[1000]; | ^~~~~~ main.cpp:49:39: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'big_st' with type 'int [1000]' [-Warray-bounds] 49 | dc_st[i] = dc_dr[i] = big_st[i] = big_dr[i] = 0; | ~~~~~~~~~~^~~~~~~~~~~~~~~ main.cpp:6:37: note: 'big_st' declared here 6 | int small_st[1000], small_dr[1000], big_st[1000], big_dr[1000]; | ^~~~~~ main.cpp:48:61: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'small_st' with type 'int [1000]' [-Warray-bounds] 48 | cresc_st[i] = cresc_dr[i] = small_st[i] = small_st[i] = 0; | ~~~~~~~~~~~~^~~ main.cpp:6:5: note: 'small_st' declared here 6 | int small_st[1000], small_dr[1000], big_st[1000], big_dr[1000]; | ^~~~~~~~ main.cpp:49:51: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'big_dr' with type 'int [1000]' [-Warray-bounds] 49 | dc_st[i] = dc_dr[i] = big_st[i] = big_dr[i] = 0; | ~~~~~~~~~~^~~ main.cpp:6:51: note: 'big_dr' declared here 6 | int small_st[1000], small_dr[1000], big_st[1000], big_dr[1000]; | ^~~~~~ main.cpp:49:39: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4000, 4003] is out of the bounds [0, 4000] of object 'big_st' with type 'int [1000]' [-Warray-bounds]
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms184kbOK100
Punctaj total100

Ceva nu functioneaza?