#165
Să se determine perechea de elemente dintr-un vector egal depărtate de centru cu suma elementelor maximă.
| Problema | maxsim | Operații I/O |
maxsim.in/maxsim.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64938028 | Utilizator | |
| Fișier | maxsim.cpp | Dimensiune | 518 B |
| Data încărcării | 17 Iunie 2026, 16:57 | Scor/rezultat | 0 puncte |
In file included from /usr/include/c++/13/iostream:41, from maxsim.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 maxsim.cpp:22:23: /usr/include/c++/13/ostream:204:25: warning: ‘x’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ maxsim.cpp: In function ‘int main()’: maxsim.cpp:9:22: note: ‘x’ was declared here 9 | long long int n, x, y, smaxi=-100000000; | ^ 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 maxsim.cpp:22:31: /usr/include/c++/13/ostream:204:25: warning: ‘y’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ maxsim.cpp: In function ‘int main()’: maxsim.cpp:9:25: note: ‘y’ was declared here 9 | long long int n, x, y, smaxi=-100000000; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxsim 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ă.