ymkzpx

Success and failure are temporary.


  • Home

  • Archives

  • Tags

  • About

2018计蒜之道复赛 贝壳找房计数比赛

Posted on 2018-06-20 | In ACM , 数学

给一个字符串 $s$ 和字符串 $t$ ,求出 $s$ 的所有去重全排列中 $t$ 出现的次数。比如aab的去重全排列为aab、aba、baa。注意aaaa算出现两次aaa。(1<=|$s$|<=|$t$|<=$10^5$)

题解

$$
{\frac{(Slen-tlen+1) \ (Slen-tlen) !} {\sum_{x = 0} ^ {25} ({cnts[i]-cntt[i]} )! } } $$

# 数学 # 组合数学
2018计蒜之道复赛 贝壳找房函数最值
分块&莫队算法
  • Table of Contents
  • Overview
Kzpx

Kzpx

Hello the cruel world.

215 posts
133 categories
100 tags
GitHub
Links
  • CS-Notes
  • Ali-CsNotes
  • Deadline
  • luowentao
  • biubiubiu
  • Gstnt
  • ecnu
  • Lzy
  • Menci
  • kuangbin
  • meopass
  • tokitsukaze
  • cubercsl
  • Claris
  • hzwer
  • qscqesze
  • ICPCCamp
  • ZYF
  • xehoth
  • Ocean
  • MrBird_to_fly
  • starry_sky
  • Multi-school AC>=20
  • snowy_smile
  • fjzzq2002
  1. 1. 题解
© 2019 Kzpx
Powered by Hexo
|
Theme — NexT.Mist v5.1.4