profesir's blog

By profesir, history, 4 years ago, In English

Can you please tell me more efficient approach to TIP1(spoj).

Here is my code causing TLE problem.

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By profesir, history, 4 years ago, In English

Quetion link- Easy Sum Set Problem — https://www.hackerearth.com/practice/algorithms/searching/linear-search/practice-problems/algorithm/easy-sum-set-problem-7e6841ca/description

Solution for Best Submission — https://www.hackerearth.com/submission/45205049

For this test case:-
2
1 2
3
3 4 8

Output as by best submission code — 2

Real Answer should be — 2 6 or 2 7

Can anyone please help me with the real solution?

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it