#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 | #64662562 | Utilizator | |
| Fișier | colegale.cpp | Dimensiune | 439 B |
| Data încărcării | 21 Mai 2026, 10:13 | Scor/rezultat | Eroare de compilare |
colegale.cpp: In function ‘int main()’: colegale.cpp:6:2: error: ‘book’ was not declared in this scope; did you mean ‘bool’? 6 | book gasit =false; | ^~~~ | bool colegale.cpp:7:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(i=0;i<n;i++) | ^~~ colegale.cpp:10:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 10 | for(j=0;j<m;j++) | ^~~ colegale.cpp:12:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(i=0;i<n;i++) | ^~~ colegale.cpp:14:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | if(ok==true){cout << a[i][j]<< " "; | ^~ colegale.cpp:15:20: error: ‘gasit’ was not declared in this scope 15 | gasit=true; | ^~~~~ colegale.cpp:18:4: error: ‘gasit’ was not declared in this scope 18 | if(gasit==false) cout << "nu exista"; | ^~~~~
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ă.