#P10908. Unique Array Composition Problem

    ID: 12953 Type: Default 1000ms 256MiB

Unique Array Composition Problem

Unique Array Composition Problem

Given an array containing a copies of 1, b copies of 2, and c copies of 3, define the probability \(P_{i,j}\) as the probability that when two distinct numbers are chosen at random from the array, one of them is i and the other is j. For example, \(P_{1,2}=\frac{ab}{C(a+b+c,2)}\), where \(C(N,M)=\binom{N}{M}\) is the binomial coefficient.

You are given that:

  • \(P_{1,2}=\frac{517}{2091}\)
  • \(P_{2,3}=\frac{2632}{10455}\)
  • \(P_{1,3}=\frac{308}{2091}\)

Determine positive integers \(a\), \(b\), and \(c\) such that these equations hold and the total number \(a+b+c\) is minimized. It is guaranteed that the minimal solution is unique.

Your output should be a string formatted as "a,b,c". For instance, if the answer is \(a=12\), \(b=34\), \(c=56\), then you should output 12,34,56.

inputFormat

This problem does not require any input. You simply need to output the answer string.

outputFormat

Output a string in the format a,b,c which represents the counts of 1's, 2's, and 3's in the array, respectively.

sample

dummy
55,94,56