#635
Vecini1
Se dă o matrice cu n
linii și m
coloane și elemente numere naturale. Determinați pentru câte dintre elementele matricei toți vecinii au valori diferite între ele.
Problema | Vecini1 | Operații I/O |
vecini1.in /vecini1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54307438 | Utilizator | |
Fișier | vecini1.cpp | Dimensiune | 516 B |
Data încărcării | 25 Noiembrie 2024, 12:58 | Scor / rezultat | Eroare de compilare |
vecini1.cpp:6:1: error: expected ',' or ';' before 'long' long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:26: error: expected unqualified-id before ',' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:28: error: expected constructor, destructor, or type conversion before ',' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:30: error: expected constructor, destructor, or type conversion before ',' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:32: error: expected constructor, destructor, or type conversion before ',' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:34: error: expected constructor, destructor, or type conversion before ',' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp:6:38: error: expected constructor, destructor, or type conversion before '=' token long long a[102][102]={0},n,m,i,j,cnt=0; ^ vecini1.cpp: In function 'int main()': vecini1.cpp:8:7: error: 'n' was not declared in this scope {fin>>n>>m; ^ vecini1.cpp:8:10: error: 'm' was not declared in this scope {fin>>n>>m; ^ vecini1.cpp:9:5: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ vecini1.cpp:10:9: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ vecini1.cpp:11:10: error: 'a' was not declared in this scope fin>>a[i][j]; ^ vecini1.cpp:12:7: error: 'i' was not declared in this scope for (i=0;i<=n+1;i++) ^ vecini1.cpp:14:6: error: 'a' was not declared in this scope a[i][0]=k--; ^ vecini1.cpp:14:14: error: 'k' was not declared in this scope a[i][0]=k--; ^ vecini1.cpp:16:11: error: 'i' was not declared in this scope for (i=0;i<=m;i++) ^ vecini1.cpp:17:8: error: 'a' was not declared in this scope {a[0][i]=k--; ^ vecini1.cpp:17:16: error: 'k' was not declared in this scope {a[0][i]=k--; ^ vecini1.cpp:19:10: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ vecini1.cpp:20:13: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ vecini1.cpp:21:10: error: 'a' was not declared in this scope if (a[i-1][j]!=a[i][j+1]!=a[i+1][j]!=a[i][j-1]) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Vecini1 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ă.