#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 | #63063267 | Utilizator | |
| Fișier | maxmat.cpp | Dimensiune | 585 B |
| Data încărcării | 12 Februarie 2026, 10:40 | Scor/rezultat | Eroare de compilare |
maxmat.cpp:6:1: error: expected ',' or ';' before 'int' int n,m,a[26][26],i,j,maxap,ap; ^ maxmat.cpp: In function 'int main()': maxmat.cpp:9:10: error: 'n' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:9:13: error: 'm' was not declared in this scope fin>>n>>m; ^ maxmat.cpp:10:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxmat.cpp:11:13: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ maxmat.cpp:12:18: error: 'a' was not declared in this scope cin>>a[i][j]; ^ maxmat.cpp:13:10: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxmat.cpp:15:10: error: 'maxap' was not declared in this scope maxap=-1001; ^ maxmat.cpp:16:17: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ maxmat.cpp:18:20: error: 'a' was not declared in this scope if(a[i][j]>maxap) ^ maxmat.cpp:21:21: error: 'ap' was not declared in this scope ap=j; ^ maxmat.cpp:24:32: error: 'ap' was not declared in this scope fout<<maxap<<" "<<ap<<" "<<endl; ^
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ă.