Can anyone tell how to solve BIPFAMIL

Hey guys!

I was trying to solve A Family of Bipartite Graphs from this years ICPC. I tried to go for a dp appraoch but sadly couldnt correctly frame the recurrence. Can anyone who has solved/upsolved it help me get the intuition for it? Curious because some people said its standard dp.

1 Like

i was just thinking that
this might be the correct formula but when i submitted it is showing wrong answer
power(m*(m+1)/2,n)-power(m,n)

power(a,b)=(a)^b