#3317

Find the Number of Possible Ways for an Event

master · 1860 · lc hard +32 · 34.9% accepted · 75 likes · top 13%

Description

You are given integers n, x, and y. An event has n performers each assigned to one of x stages. Each non-empty stage receives a score in [1, y]. Count the number of distinct events (differing in any performer's stage or any band's score) modulo 109 + 7.

Code

1
2
3