Borderou de evaluare (job #2814053)

Utilizator oporanu.alexAlex Oporanu oporanu.alex Data 7 decembrie 2021 15:10:50
Problema Diametrul unui arbore Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:34:12: warning: unused variable 'E' [-Wunused-variable] 34 | int V, E; | ^ main.cpp:31:17: warning: iteration 100004 invokes undefined behavior [-Waggressive-loop-optimizations] 31 | dist[i] = -1; | ~~~~~~~~^~~~ main.cpp:30:22: note: within this loop 30 | for(int i = 1; i <= nmax; ++i) | ~~^~~~~~~ main.cpp:44:17: warning: iteration 100004 invokes undefined behavior [-Waggressive-loop-optimizations] 44 | dist[i] = -1; | ~~~~~~~~^~~~ main.cpp:43:22: note: within this loop 43 | for(int i = 1; i <= nmax; ++i) | ~~^~~~~~~ main.cpp:31:17: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [400020, 400023] is out of the bounds [0, 400020] of object 'dist' with type 'int [100005]' [-Warray-bounds] 31 | dist[i] = -1; | ~~~~~~~~^~~~ main.cpp:6:5: note: 'dist' declared here 6 | int dist[nmax] = {-1}; | ^~~~ main.cpp:44:17: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [400020, 400023] is out of the bounds [0, 400020] of object 'dist' with type 'int [100005]' [-Warray-bounds] 44 | dist[i] = -1; | ~~~~~~~~^~~~ main.cpp:6:5: note: 'dist' declared here 6 | int dist[nmax] = {-1}; | ^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
16ms2625kbOK10
26ms2490kbOK10
36ms2498kbOK10
46ms2605kbOK10
516ms3321kbOK10
649ms4321kbOK10
768ms4857kbOK10
8110ms5795kbOK10
978ms6029kbOK10
10154ms6623kbOK10
Punctaj total100

Ceva nu functioneaza?