Borderou de evaluare (job #748679)

Utilizator avatar trofim_ion Trofim Ion trofim_ion IP ascuns
Problemă Bradul (clasa a 9-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 1 dec. 2023 16:57:02 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:15:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 15 | freopen("bradul.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:16:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result] 16 | freopen("bradul.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:20:45: warning: iteration 9999 invokes undefined behavior [-Waggressive-loop-optimizations] 20 | for(int i = 1 ; i < 100000 ; ++i) ps[i] = i*i; | ~~~~~~^~~~~ main.cpp:20:23: note: within this loop 20 | for(int i = 1 ; i < 100000 ; ++i) ps[i] = i*i; | ~~^~~~~~~~ main.cpp:24:19: warning: 'branch' may be used uninitialized [-Wmaybe-uninitialized] 24 | if(n == branch*branch) cout << branch << " centru"; | ~~~~~~^~~~~~~ main.cpp:22:8: note: 'branch' was declared here 22 | ll branch; | ^~~~~~