#486
Să se determine maximul şi minimul valorilor elementelor unui vector.
| Problema | MinMax0 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64185620 | Utilizator | |
| Fișier | minmax0.cpp | Dimensiune | 354 B |
| Data încărcării | 22 Aprilie 2026, 08:43 | Scor/rezultat | 100 puncte |
minmax0.cpp: In function ‘int main()’: minmax0.cpp:16:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 16 | if (v[i]>mx)mx=v[i];poz=i; | ^~ minmax0.cpp:16:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | if (v[i]>mx)mx=v[i];poz=i; | ^~~ minmax0.cpp:18:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 18 | if (v[i]<mn)mn=v[i];poz=i; | ^~ minmax0.cpp:18:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 18 | if (v[i]<mn)mn=v[i];poz=i; | ^~~ minmax0.cpp:9:9: warning: variable ‘poz’ set but not used [-Wunused-but-set-variable] 9 | int poz; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 100 | 100 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MinMax0 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ă.