Can anyone help me with Distinct Partition Squares from TCS Mockvita 2018 Contest?

help
codechef
contest
mockvita
tcs

#1

Hi Guys can someone tell me how to approach this problem ?

@vijju123 @taran_1407 @vivek_1998299 @meooow @john_smith_3 @aryanc403 @vbt_95

NOTE : This question is not from an ongoing contest. It’s a past contest problem :slight_smile:


#2

someone on this ?


#3

please someone help on this???


#4

use dp

dp[n][k][lastElement][Number] denotes count of all k distinct partitions of n(where we represent partition only in increasing order to avoid the permuatation issue),lastElement is the lastElement in all those partitions,and Number says how many of the elements in those partitions are a square(u can restrict this case to two)