#4266
MITM
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 | tastatură/ecran |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50667635 | Utilizator | |
Fișier | mitm.cpp | Dimensiune | 1.08 KB |
Data încărcării | 19 Aprilie 2024, 12:44 | Scor / rezultat | Eroare de compilare |
mitm.cpp: In function 'int main()': mitm.cpp:23:21: error: size of array 'nx' has non-integral type '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' int nx[pow (2, o)]; ^ mitm.cpp:24:21: error: size of array 'ny' has non-integral type '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' int ny[pow (2, d)]; ^ mitm.cpp:31:15: error: 'v' was not declared in this scope s=s+v[i]*c[j]; ^ mitm.cpp:41:4: error: expected ';' before '}' token } ^ mitm.cpp:48:15: error: 'v' was not declared in this scope s=s+v[i]*c[j]; ^ mitm.cpp:59:29: error: invalid operands of types 'int [1]' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' to binary 'operator+' sort (nx+1, nx+pow (2, o)+1); ^ mitm.cpp:60:29: error: invalid operands of types 'int [1]' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' to binary 'operator+' sort (ny+1, nx+pow (2, d)+1); ^
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ă.