Tap here to switch tabs
Problem
Submissions

Problem: Find the Number of Possible Ways for an Event

Find the Number of Possible Ways for an Event by assigning each performer to one stage and giving each nonempty stage a score from one through the maximum. Return the total modulo a large prime.

Statement

You are given three positive integers n, x, and y.

An event has n performers and x available stages.

The event is organized according to the following conditions:

  • Each performer is assigned to exactly one stage.

  • Each stage that contains at least one performer forms a band.

  • Each band is awarded an integer score between 11 and y, inclusive.

Return the total number of possible ways to organize the event. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \le n, x, y ≤1000\le 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Number of Possible Ways for an Event

Find the Number of Possible Ways for an Event by assigning each performer to one stage and giving each nonempty stage a score from one through the maximum. Return the total modulo a large prime.

Statement

You are given three positive integers n, x, and y.

An event has n performers and x available stages.

The event is organized according to the following conditions:

  • Each performer is assigned to exactly one stage.

  • Each stage that contains at least one performer forms a band.

  • Each band is awarded an integer score between 11 and y, inclusive.

Return the total number of possible ways to organize the event. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \le n, x, y ≤1000\le 1000