P821 Distinct Subsequences

Distinct Subsequences

题目描述

Given a string S and a string T, count the number of distinct subsequences of S which is equal to T. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., "nus" is a subsequence of "njucs" while "nsu" is not).

输入格式

The first line is an interger Q( Q = 50 ), indicating the number of test cases.

🔒
登录后查看完整题面
登录后查看题目

统计