alex_cismas Posted March 10, 2010 Report Share Posted March 10, 2010 Am si eu nev cat mai rapid de rezolvare la problema . Calculati prin divide et impera suma valorilor strict pozitive dintr`un vector x de numere reale. Program complet. Quote Link to comment Share on other sites More sharing options...
Fitty Posted March 10, 2010 Report Share Posted March 10, 2010 In ce limbaj? Si ai uitat cuvantul majic Quote Link to comment Share on other sites More sharing options...
loki Posted March 10, 2010 Report Share Posted March 10, 2010 Probabil c++. Algoritmul de Divide et Impera nu-si are rostul pentru aceasta problema.Totusi te poti uita pe urmatorul link.Metoda Divide et Imperaar avea sens daca sirul ar fi ordonat.Atunci cauti prin divide et impera primul element >0 si apoi incepi sa aduni toate elementele sirului incepand de la el. Ca idee cum se foloseste metoda: similar problemei "imi aleg un numar de la 1 la 100, tu zici mai mic sau mai mare, trebuie sa il ghicesc din cat mai putine incercari. Adica maxim 7". Quote Link to comment Share on other sites More sharing options...