#668
Identice1
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 | #51447243 | Utilizator | |
Fișier | identice1.cpp | Dimensiune | 480 B |
Data încărcării | 18 Iunie 2024, 10:21 | Scor / rezultat | Eroare de compilare |
identice1.cpp: In function 'int main()': identice1.cpp:6:29: error: expected initializer before 'k' int n , m , a[103][103] k=0 , ok = 0 , v[101]; ^ identice1.cpp:9:45: error: 'a' was not declared in this scope for(int j = 0 ; j < m ; ++j) cin >> a[i][j]; ^ identice1.cpp:12:9: error: 'ok' was not declared in this scope ok= 0; ^ identice1.cpp:15:16: error: 'v' was not declared in this scope if(v[j]==a[i][j]) ^ identice1.cpp:15:22: error: 'a' was not declared in this scope if(v[j]==a[i][j]) ^ identice1.cpp:17:13: error: 'v' was not declared in this scope v[j]=a[i][j]; ^ identice1.cpp:17:18: error: 'a' was not declared in this scope v[j]=a[i][j]; ^ identice1.cpp:19:14: error: 'cnt' was not declared in this scope if ( cnt == m) k++; ^ identice1.cpp:19:24: error: 'k' was not declared in this scope if ( cnt == m) k++; ^ identice1.cpp:21:11: error: 'k' was not declared in this scope cout<<k; ^
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ă.