Available question text
Count the ways to assign n labeled performers to x distinguishable stages (some stages may be empty) and then give each non-empty stage a score from 1..y, with the total taken modulo 1e9+7.
Equivalently, compute the sum over k (number of non-empty stages) of C(x,k)*S(n,k)*k!*y^k, so the main challenge is efficiently computing Stirling numbers and binomial coefficients under the modulus for n,x,y up to 1000.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3317. Find the Number of Possible Ways for an Event
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source