RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00557

Trener

Unrated 레이팅 미적용
난이도
1s
시간 제한
256MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

At this point we already know that students love to sleep. Patrik is a
record holder in this category. He wakes up only when he needs to eat
or if he wishes to play FIFA 20. Therefore, his dreams usually revolve
around football. In his last dream, he found himself in the role of a football
manager of his favourite team – GNK Dinamo Zagreb.
His job is to select \(N\) players that will defend the blue colors in the next
season, but the board has some peculiar requests. They are:
• All players must have surnames of distinct lengths.
• Surname of a player must appear as a continuous subsequence of surnames of all players whose
surnames are longer.
To make his job easier, Patrik divided the potential players in \(N\) buckets such that players in \(i-th\) bucket
have exactly \(i\) letters in their surname. In each of these buckets there are exactly \(K\) players. Patrik wants
to know in how many distinct ways (modulo \(10^{9} + 7\)) can he choose the players for his squad while also
conforming to the given requests.

제약
입력 형식

The first line contains two integers \(N\) (\(1 \le N \le 50\)) and \(K\) (\(1 \le K \le 1\,500\)).
Each of the next \(N\) lines contains \(K\) not necessarily distinct surnames of players. The surnames of players
in \(i-th\) of those lines consist of exactly \(i\) lowercase letters from the English alphabet.

출력 형식

In the only line you should output the answer from the task description.
Bodovanje
Subtask
Score
Constraints
1
22
\(N = 5\) and \(K = 10\)
2
33
\(N = 50\) and \(K = 100\)
3
55
No additional constraints.

예제 1
입력
3 2
a b
ab bd
abc abd
출력
5
예제 2
입력
3 3
a b c
aa ab ac
aaa aab aca
출력
6
예제 3
입력
3 1
a
bc
def
출력
0
설명

Clarification of the first example: Patrik can choose the following teams: (a, ab, abc), (a, ab,
abd), (b, ab, abc), (b, ab, abd) and (b, bd, abd).

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2019/2020 Contest 6

평가 및 의견

Trener

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Trener

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8