#668
Se dă o matrice cu n
linii și m
coloane și elemente numere naturale. Să se determine câte perechi de linii consecutive din matrice sunt identice.
Problema | Identice1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57875117 | Utilizator | |
Fișier | identice1.cpp | Dimensiune | 385 B |
Data încărcării | 28 Aprilie 2025, 19:05 | Scor / rezultat | Eroare de compilare |
identice1.cpp: In function 'int main()': identice1.cpp:4:9: error: expected unqualified-id before '[' token int [101][101], n, m, nr = 0; ^ identice1.cpp:5:13: error: 'n' was not declared in this scope cin >> n >> m; ^ identice1.cpp:5:18: error: 'm' was not declared in this scope cin >> n >> m; ^ identice1.cpp: In lambda function: identice1.cpp:8:20: error: expected '{' before '[' token cin >> [i][j]; ^ identice1.cpp: In function 'int main()': identice1.cpp:8:20: error: no match for 'operator[]' (operand types are 'main()::__lambda0' and 'int') identice1.cpp:12:17: error: 'v' was not declared in this scope if (v[i][j] != v[i + 1][j]) ^ identice1.cpp:13:13: error: 'nr' was not declared in this scope nr++; ^ identice1.cpp:14:15: error: 'nr' was not declared in this scope } cout << nr; ^ identice1.cpp:15:13: error: expected '}' at end of input return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Identice1 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ă.