#804
Se dă o matrice cu m linii şi n coloane şi elemente numere naturale cu cel mult 4 cifre fiecare. Să se determine coloanele matricei care au toate elementele egale cu aceeași valoare.
Variante Bacalaureat 2013
| Problema | ColEgale | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64893623 | Utilizator | |
| Fișier | colegale.cpp | Dimensiune | 341 B |
| Data încărcării | 10 Iunie 2026, 09:42 | Scor/rezultat | Eroare de compilare |
colegale.cpp: In function ‘int main()’: colegale.cpp:8:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for(int i=1;i<=m;i++) | ^~~ colegale.cpp:11:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(int i=1;i<=m;i++) | ^~~ colegale.cpp:15:12: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 15 | if(a[i][j]!=a[i+1][j];{ | ^ colegale.cpp:15:19: warning: statement has no effect [-Wunused-value] 15 | if(a[i][j]!=a[i+1][j];{ | ~~~~~~~^~~~~~~~~~~ colegale.cpp:15:31: error: expected primary-expression before ‘{’ token 15 | if(a[i][j]!=a[i+1][j];{ | ^ colegale.cpp:15:31: error: expected ‘)’ before ‘{’ token 15 | if(a[i][j]!=a[i+1][j];{ | ~ ^ | ) colegale.cpp:6:21: warning: unused variable ‘b’ [-Wunused-variable] 6 | { int m,n,a[55][55],b; | ^ colegale.cpp: At global scope: colegale.cpp:20:5: error: expected unqualified-id before ‘return’ 20 | return 0; | ^~~~~~ colegale.cpp:21:1: error: expected declaration before ‘}’ token 21 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ColEgale 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ă.