#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 | #64769646 | Utilizator | |
| Fișier | pozminmax.cpp | Dimensiune | 471 B |
| Data încărcării | 28 Mai 2026, 22:58 | Scor/rezultat | Eroare de compilare |
pozminmax.cpp: In function ‘int main()’: pozminmax.cpp:13:12: error: expected ‘;’ before ‘v’ 13 | cin v[i]; | ^~ | ; pozminmax.cpp:13:9: warning: statement has no effect [-Wunused-value] 13 | cin v[i]; | ^~~ pozminmax.cpp:14:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 14 | if(v[i]<min); | ^~ pozminmax.cpp:15:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 15 | min=v[i]; | ^~~ pozminmax.cpp:18:16: error: expected ‘;’ before '\x20' 18 | cout<< imin ' ' << endl; | ^~~~ | ; pozminmax.cpp:21:12: error: expected ‘;’ before ‘v’ 21 | cin v[i]; | ^~ | ; pozminmax.cpp:21:9: warning: statement has no effect [-Wunused-value] 21 | cin v[i]; | ^~~ pozminmax.cpp:22:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 22 | if(v[i]>max); | ^~ pozminmax.cpp:23:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 23 | max=v[i]; | ^~~
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ă.