Borderou de evaluare (job #2853894)

Utilizator t0n1Suciu Toni t0n1 Data 20 februarie 2022 18:25:34
Problema Ciurul lui Eratosthenes Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'void ciur()': main.cpp:12:18: warning: iteration 2000098 invokes undefined behavior [-Waggressive-loop-optimizations] 12 | ciurr[i] = 1; | ~~~~~~~~~^~~ main.cpp:11:18: note: within this loop 11 | for(i = 2; i <= elem; i++) | ~~^~~~~~~ main.cpp:14:18: warning: iteration 1000048 invokes undefined behavior [-Waggressive-loop-optimizations] 14 | ciurr[i] = 0; | ~~~~~~~~~^~~ main.cpp:13:18: note: within this loop 13 | for(i = 4; i <= elem; i += 2) | ~~^~~~~~~ main.cpp:12:18: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 2000100 is out of the bounds [0, 2000100] of object 'ciurr' with type 'bool [2000100]' [-Warray-bounds] 12 | ciurr[i] = 1; | ~~~~~~~~~^~~ main.cpp:7:6: note: 'ciurr' declared here 7 | bool ciurr[elem]; | ^~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
154ms2269kbOK10
253ms2166kbOK10
353ms2220kbOK10
453ms2232kbOK10
553ms2211kbOK10
654ms2174kbOK10
753ms2154kbOK10
854ms2158kbOK10
958ms2269kbOK10
1053ms2183kbOK10
Punctaj total100

Ceva nu functioneaza?