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

Pier Paolo Guillen Hernandez How to count? [3] // Problem 1142. Relations 1 Dec 2002 08:08
  Any hint on how to count all relations?

    Thanks!
Dilyan Re: How to count? [2] // Problem 1142. Relations 1 May 2005 15:55
use DP. your function will be F(n, k) where N is the amount of number in the relation and K is the number of groups.
For example:
a=b=c=d - 1 group
a=b<c=d - 2 groups
a<b<c<d - 4 groups

equal numbers form one group.

Edited by author 09.05.2005 05:40
zeroh Re: How to count? [1] // Problem 1142. Relations 28 Jan 2008 07:01
It's a maths problem. Like that puting N balls into M boxes.

Edited by author 28.01.2008 07:01
Taras Vasylyshyn Re: How to count? // Problem 1142. Relations 26 Jul 2010 16:31
Thank you! The idea of puting balls into boxes helped me.