#4266
Fie un număr natural s
și un șir de n
numere naturale nenule. Să se determine suma maximă posibilă, mai mică sau egală cu s
ce se poate obține dintr-un subșir al șirului.
Folclorul informatic
Problema | MITM | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57715255 | Utilizator | |
Fișier | mitm.cpp | Dimensiune | 1.11 KB |
Data încărcării | 11 Aprilie 2025, 16:14 | Scor / rezultat | 0 puncte |
mitm.cpp: In function 'int Submultimi(long long int*, long long int*, int)': mitm.cpp:13:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ mitm.cpp: In function 'int main()': mitm.cpp:36:18: warning: 's' may be used uninitialized in this function [-Wmaybe-uninitialized] if (X[i] <= s) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
1 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
11 | 0.004 secunde | Raspuns gresit. | 5 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
14 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
15 | 0.004 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0.024 secunde | Raspuns gresit. | 5 | 0 | ||
17 | 0.048 secunde | Raspuns gresit. | 5 | 0 | ||
18 | 0.224 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0.224 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MITM 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ă.