X
X
xozzslip2016-02-16 14:28:47
Mathematics
xozzslip, 2016-02-16 14:28:47

The task from the introductory in the computer science center. How to decide?

Given an ordered array of natural numbers: 6fb3a4122ae7458991a42c3ab6e4e7c7.pngBuild an algorithm that checks whether all numbers can be divided into two parts so that the sums of the numbers in the parts differ by no more than two times. Estimate the running time of the algorithm, prove its correctness.
Suspiciously squint and recognize the backpack, in which you need to put from 0.25 to half the sum of all the elements.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-02-16
@xozzslip

It seems to be - algolist.manual.ru/olimp/sor_sol.php#a2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question