#81
Matrice
Scrieţi un program care citeşte de la tastatură un tablou bidimensional cu n
linii şi n
coloane și afişează pe ecran numărul valorilor din tablou care sunt strict mai mari decât toți vecinii lor.
Problema | Matrice | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #18459635 | Utilizator | |
Fișier | matrice.cpp | Dimensiune | 473 B |
Data încărcării | 06 Noiembrie 2019, 22:01 | Scor / rezultat | Eroare de compilare |
matrice.cpp:6:1: error: stray '\302' in program cin>>n; ^ matrice.cpp:6:1: error: stray '\240' in program matrice.cpp:6:1: error: stray '\302' in program matrice.cpp:6:1: error: stray '\240' in program matrice.cpp:7:1: error: stray '\302' in program for (i=1;i<=n;i++) ^ matrice.cpp:7:1: error: stray '\240' in program matrice.cpp:9:1: error: stray '\302' in program for (i=1; i<=n;i++) for (j=1;j<=n;j++) ^ matrice.cpp:9:1: error: stray '\240' in program matrice.cpp:9:1: error: stray '\302' in program matrice.cpp:9:1: error: stray '\240' in program matrice.cpp:11:1: error: stray '\302' in program int c = A[i][j]; ^ matrice.cpp:11:1: error: stray '\240' in program matrice.cpp:11:1: error: stray '\302' in program matrice.cpp:11:1: error: stray '\240' in program matrice.cpp:11:1: error: stray '\302' in program matrice.cpp:11:1: error: stray '\240' in program matrice.cpp:11:1: error: stray '\302' in program matrice.cpp:11:1: error: stray '\240' in program matrice.cpp:12:1: error: stray '\302' in program if (c > A[i][j-1] && c > A[i][j+1] && c > A[i+1][j] && c > A[i-1][j]) ^ matrice.cpp:12:1: error: stray '\240' in program matrice.cpp:12:1: error: stray '\302' in program matrice.cpp:12:1: error: stray '\240' in program matrice.cpp:12:1: error: stray '\302' in program matrice.cpp:12:1: error: stray '\240' in program matrice.cpp:12:1: error: stray '\302' in program matrice.cpp:12:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program nr_varfuri = nr_varfuri + 1; ^ matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:14:1: error: stray '\302' in program matrice.cpp:14:1: error: stray '\240' in program matrice.cpp:15:1: error: stray '\302' in program } ^ matrice.cpp:15:1: error: stray '\240' in program matrice.cpp:15:1: error: stray '\302' in program matrice.cpp:15:1: error: stray '\240' in program matrice.cpp:15:1: error: stray '\302' in program matrice.cpp:15:1: error: stray '\240' in program matrice.cpp:15:1: error: stray '\302' in program matrice.cpp:15:1: error: stray '\240' in program matrice.cpp:16:1: error: stray '\302' in program } ^ matrice.cpp:16:1: error: stray '\240' in program matrice.cpp:16:1: error: stray '\302' in program matrice.cpp:16:1: error: stray '\240' in program matrice.cpp:17:1: error: stray '\302' in program cout<<nr_varfuri; ^ matrice.cpp:17:1: error: stray '\240' in program matrice.cpp:17:1: error: stray '\302' in program matrice.cpp:17:1: error: stray '\240' in program matrice.cpp:18:1: error: stray '\302' in program return 0; ^ matrice.cpp:18:1: error: stray '\240' in program matrice.cpp:18:1: error: stray '\302' in program matrice.cpp:18:1: error: stray '\240' in program matrice.cpp: In function 'int main()': matrice.cpp:7:9: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ matrice.cpp:8:14: error: 'j' was not declared in this scope for (j=1;j<=n;j++) cin>>A[i][j]; ^ matrice.cpp:9:12: error: 'i' was not declared in this scope for (i=1; i<=n;i++) for (j=1;j<=n;j++) ^ matrice.cpp:9:32: error: 'j' was not declared in this scope for (i=1; i<=n;i++) for (j=1;j<=n;j++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Matrice 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ă.