#553
Să se determine indicele maximului şi cel al minimului valorilor elementelor unui vector.
| Problema | PozMinMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64915941 | Utilizator | |
| Fișier | pozminmax.cpp | Dimensiune | 352 B |
| Data încărcării | 12 Iunie 2026, 16:28 | Scor/rezultat | Eroare de compilare |
pozminmax.cpp: In function ‘int main()’: pozminmax.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(i=2; i<=n; i++) | ^~~ pozminmax.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | if(v[i]>v[imax]) | ^~ pozminmax.cpp: At global scope: pozminmax.cpp:17:5: error: ‘cout’ does not name a type 17 | cout << imin << " " << imax; | ^~~~ pozminmax.cpp:18:5: error: expected unqualified-id before ‘return’ 18 | return 0; | ^~~~~~ pozminmax.cpp:19:1: error: expected declaration before ‘}’ token 19 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PozMinMax 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ă.