#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 | #64386909 | Utilizator | |
| Fișier | pozminmax.cpp | Dimensiune | 368 B |
| Data încărcării | 04 Mai 2026, 18:16 | Scor/rezultat | 100 puncte |
In file included from /usr/include/c++/13/iostream:41, from pozminmax.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at pozminmax.cpp:15:13: /usr/include/c++/13/ostream:204:25: warning: ‘pmin’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ pozminmax.cpp: In function ‘int main()’: pozminmax.cpp:5:45: note: ‘pmin’ was declared here 5 | long long n, min=9999999, max=-9999999, pmin, pmax; | ^~~~ In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at pozminmax.cpp:15:28: /usr/include/c++/13/ostream:204:25: warning: ‘pmax’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ pozminmax.cpp: In function ‘int main()’: pozminmax.cpp:5:51: note: ‘pmax’ was declared here 5 | long long n, min=9999999, max=-9999999, pmin, pmax; | ^~~~
| 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. | 30 | 30 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
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ă.