HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Forums > Discussion of problems > topic:


Problem "Sum of the Pairs"

There is a contest!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

aeleziMar.15.2016 at 10:49:09 AM
0Сообщение скрыто

imesecanMar.19.2016 at 10:30:54 AM
1The question says there may be 200.000 numbers.
This means you cannot use quadratic solution here.

You need to read numbers and sort them. Then using Binary search, search for the complementary number.

imesecanApr.28.2017 at 06:41:59 AM
2--- Test 2---
10 2
5 4 3 2 -3 6 -2 1 0 -4

--- Pattern ---
4

imesecanApr.28.2017 at 06:42:54 AM
3--- Test 1 ---
7 5
0 3 2 1 -4 9 -2

--- Pattern ---
2


www.contester.ru