#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 | #64624444 | Utilizator | |
| Fișier | maxmat.cpp | Dimensiune | 606 B |
| Data încărcării | 19 Mai 2026, 10:13 | Scor/rezultat | 100 puncte |
maxmat.cpp: In function ‘int main()’: maxmat.cpp:14:13: warning: overflow in conversion from ‘long int’ to ‘int’ changes value from ‘-9999999999’ to ‘-1410065407’ [-Woverflow] 14 | maxim = -9999999999; | ^~~~~~~~~~~ maxmat.cpp:18:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for (j=1; j<=m; j++) | ^~~ maxmat.cpp:24:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | fout << maxim << " " << c << "\n"; | ^~~~ maxmat.cpp:25:22: warning: overflow in conversion from ‘long int’ to ‘int’ changes value from ‘-9999999999’ to ‘-1410065407’ [-Woverflow] 25 | maxim = -9999999999; | ^~~~~~~~~~~ maxmat.cpp:24:42: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 24 | fout << maxim << " " << c << "\n"; | ^~~~ maxmat.cpp:9:22: note: ‘c’ was declared here 9 | int i, j, maxim, c; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 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ă.