TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P3440
  • Problem
  • P3440【HN Training 2015 Round5】Tony的电话本
    Limits : Time Limit : - MS   Memory Limit : 265536 KB
    Judgment Tips : 3s
    Description

    Input Format

    InputFormat

    Output Format

    OutputFormat

    Sample Input 1


    Sample Output 1


    Sample Input 2

    3 4
    aaaaa

    Sample Output 2

    6

    Hint

    样例解释:
    符合要求的有6种(用[p]s表示起始位置为p的s片段)

    ([1]aaaa, [1]aaaaa, [1]aaaaa)、([1]aaaaa,[1]aaaa, [1]aaaaa)、
    ([1]aaaaa, [1]aaaaa, [1]aaaa)、([2]aaaa, [1]aaaaa, [1]aaaaa)、
    ([1]aaaaa, [2]aaaa, [1]aaaaa)、([1]aaaaa, [1]aaaaa, [2]aaaa)