SANSKAR problem DEC14

i don’t want you to reveal anything about the solution.

seeing the time limit on the question, i thought any naive approach would not be enough. By then, i start to think that this is the typical NP-hard problem.
So, is it that typical NP-hard problem i’m thinking about?? But how can a NP-hard problem can run in the given time limit for this question. And if you apply DP(though i have 2 WA already), how can it work for large sums for subtask #2?
P.S. If answering this reveals the solution or any algorithm applied to do this problem, then don’t answer it.

1 Like

As far as I know, yes It is NP-Hard Problem…
& yes It can be solved, although I’m also wondering how, but submission results have shown that It is possible…
So, keep trying…
Sleep. Code. Eat. Repeat.

1 Like

I think test cases for this problem weak. I think my code should have failed. I am trying to find cases where my code will fail.

2 Likes

If you find such case you can report it to [email protected]

think that might be true…

More i am correcting my code lesser test sets are passed…

As the constraints are low, it is possible to solve this NP-hard problem.But as a matter of fact, the subtask #2 is high for consideration. And yes, it is that NP-hard problem :wink:

what is task#2…my code is giving wrong answer for that
pls provide the test cases fr which my code is giving WA for SANSKAR

after the contest is over :wink:

I have a doubt, serious doubt.

Is a sanskar allocated to only single follower ?

Read the problem statement, it’s written there…

Yes… :slight_smile: Each sanskar to a single follower :slight_smile:

Thanks to all…

I am fed up of solving this question, Approx to 20 submissions but WA… :frowning:

1 Like

Lol! The same haalat in XORSUB :frowning:

Too tough questions this time! o.O

1 Like

I found few boundary case in which my code is giving wrong answer but it is accepted.

mail them to admin…

1 Like

@ajinkya1p3

Yahh in XORSUB too, able to score only 30 points… :frowning:

Yes really tough competition, i though i will do well but i am able to solve only CAPPLE for 100 points…

Still need a lot of practice… !!

1 Like

And please keep those, and add those to editorial later :wink:

2 Likes

Each follower must recieve at least one sanskari?

each sanskar is allocated to single follower .

what should be correct answer for this test case:
1 2
0
yes or no ?
answer is accepted for no, but if you see the last statement in problem, “output “yes” if it is possible to divide his sanskars equally amongst his followers” so 0 is allotted to 1st follower and then 2nd follower has nothing, sum is still zero, so shouldn’t that be a yes.