#779
Se dă o matrice cu n
linii şi m
coloane şi elemente numere naturale. Să se determine câte elemente din matrice au toți vecinii numere pare.
Problema | VeciniPari | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57867681 | Utilizator | |
Fișier | vecinipari.cpp | Dimensiune | 331 B |
Data încărcării | 28 Aprilie 2025, 12:50 | Scor / rezultat | Eroare de compilare |
vecinipari.cpp: In function 'int main()': vecinipari.cpp:14:18: warning: left operand of comma operator has no effect [-Wunused-value] if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:21: error: invalid operands of types 'int [102]' and 'int' to binary 'operator%' if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:33: warning: left operand of comma operator has no effect [-Wunused-value] if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:36: error: invalid operands of types 'int [102]' and 'int' to binary 'operator%' if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:44: warning: left operand of comma operator has no effect [-Wunused-value] if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:50: error: invalid operands of types 'int [102]' and 'int' to binary 'operator%' if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:58: warning: left operand of comma operator has no effect [-Wunused-value] if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^ vecinipari.cpp:14:64: error: invalid operands of types 'int [102]' and 'int' to binary 'operator%' if(a[i,j+1]%2==0&&a[i,j-1]%2==0,a[i+1,j]%2==0,a[i-1,j]%2==0) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VeciniPari face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.