#191
Să se determine, pentru fiecare linie a unei matrice, elementul maxim și indicele coloanei pe care se află.
| Problema | MaxMat | Operații I/O |
maxmat.in/maxmat.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64792331 | Utilizator | |
| Fișier | maxmat.cpp | Dimensiune | 588 B |
| Data încărcării | 01 Iunie 2026, 14:51 | Scor/rezultat | 100 puncte |
maxmat.cpp: In function ‘int main()’: maxmat.cpp:12:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(i=1; i<=n; i++) | ^~~ maxmat.cpp:16:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | for(i=1; i<=n; i++){ | ^~~ maxmat.cpp:10:36: warning: unused variable ‘k’ [-Wunused-variable] 10 | int mat[102][102], i, j, n, m, k=0, max=INT_MIN, pozmax; | ^ maxmat.cpp:25:25: warning: ‘pozmax’ may be used uninitialized [-Wmaybe-uninitialized] 25 | fout<<max<<" "<<pozmax<<endl; | ^~~~~~ maxmat.cpp:10:54: note: ‘pozmax’ was declared here 10 | int mat[102][102], i, j, n, m, k=0, max=INT_MIN, pozmax; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 40 | 40 | ||
| 3 | 0.001 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxMat 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ă.