ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1142. Relations

Some Useful hint is here... anyone view:
Posted by Locomotive 11 Feb 2003 12:35
HI all
For solving this problem use dynamic programming
as this way:
  for finding answer of k... do it:
    for i:=1 to k do
      f[k]:=f[k]+c(i,k)*f[k-i];
which c(i,k) is amount of ways to choose i thing from k thing:
  c(i,k)= k! / (i!*(k-i)!)
ans its proof is:
variable i is amount of '='s that use
if 1time '=' use then it we should choose 2 operand in both sides of
= operator
and if 2= uses then we should chose 3operand (form k operand that we
have)...
ans etc.
mail me for more explaination:
aidin_n7@hotmail.com