Borderou de evaluare (job #596132)

Utilizator avatar Zluca.jmecher Zamfir Luca Cristian Zluca.jmecher IP ascuns
Problemă Alarma (clasa a 6-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 14 apr. 2021 18:44:57 Scor 94

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:13:10: warning: variable 'c' set but not used [-Wunused-but-set-variable] 13 | char c; | ^ main.cpp:16:15: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 16 | fscanf(fin,"%d%d",&mat[i][1],&mat[i][2]); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:20:13: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations] 20 | v[i]=fgetc(fin); | ~~~~^~~~~~~~~~~ main.cpp:19:15: note: within this loop 19 | for(i=1; i<=4; i++) | ~^~~ main.cpp:22:27: warning: array subscript 4 is above array bounds of 'char [4]' [-Warray-bounds] 22 | min=(v[3]-'0')*10+(v[4]-'0'); | ~~~^ main.cpp:6:6: note: while referencing 'v' 6 | char v[4]; | ^ main.cpp:47:92: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds] 47 | lung1=abs(mat[combora[i]/10][1]-mat[combora[i]%10][1])+abs(mat[combora[i]/10][2]-mat[combora[i]%10][2]); | ~~~~~~~~~~~~~~~~~~~~^ main.cpp:47:114: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds] 47 | lung1=abs(mat[combora[i]/10][1]-mat[combora[i]%10][1])+abs(mat[combora[i]/10][2]-mat[combora[i]%10][2]); | ~~~~~~~~~~~~~~~~~~~~^ main.cpp:48:114: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds] 48 | lung2=abs(mat[combora[i]%10][1]-mat[combmin[j]/10][1])+abs(mat[combora[i]%10][2]-mat[combmin[j]/10][2]); | ~~~~~~~~~~~~~~~~~~~~^ main.cpp:49:114: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds] 49 | lung3=abs(mat[combmin[j]/10][1]-mat[combmin[j]%10][1])+abs(mat[combmin[j]/10][2]-mat[combmin[j]%10][2]); | ~~~~~~~~~~~~~~~~~~~~^
Test Timp execuție Memorie folosită Mesaj Punctaj/test
1 1 ms 262 kb OK 10
2 1 ms 262 kb OK 10
3 1 ms 262 kb OK 10
4 1 ms 262 kb OK 10
5 1 ms 262 kb OK 10
6 1 ms 262 kb OK 10
7 1 ms 262 kb OK 10
8 1 ms 262 kb a) OK; b) rezultat incorect 4
9 1 ms 262 kb OK 10
10 1 ms 262 kb OK 10
Punctaj total 94