I am really stuck with this, Test cases give SIGSEGV, My code is available at here
Question :
Generating the array given on some pattern (If index even then this else that)
With Q queries given, I need to find out if given integer value can be obtained by adding some of the elements of array or not. return true if yes else no.
I tried the subset-sum approach, but I can’t figure out the issue with my code.Please help and correct me if I am wrong with the approach.
I will be happy to discuss and learn. Consider me a noob, I am just starting with competitive programming.
So @hard_try, pls don’t post stuff and ask hints from an ongoing contest. Try to play fair, coz if you ask hints, you won’t benefit. This is because if the same type of question comes in an exam, you will not know the logic of it, coz you had asked help in this question. And the truth is that no one will help you in an exam.