当前位置: 首页 > news >正文

qq网页版直接登录手机版网站关键词排名优化

qq网页版直接登录手机版,网站关键词排名优化,珠海集团网站建设外包,佛山网站开发哪家好Problem - H - Codeforces 题意 思路 不知道这种trick叫什么,昨天VP刚遇到过 设 f[x] 为恰好有一个最大值为 x 的方案数,我们要求这个,那就设 g[x] 为 至少有一个最大值为 x 的方案数,那么答案就是 f[x] g[x] - g[x - 1] 这里…

Problem - H - Codeforces

题意

思路

不知道这种trick叫什么,昨天VP刚遇到过

设 f[x] 为恰好有一个最大值为 x 的方案数,我们要求这个,那就设 g[x] 为 至少有一个最大值为 x 的方案数,那么答案就是 f[x] = g[x] - g[x - 1]

这里也一样,不过要稍微变一下

Code:

#include <bits/stdc++.h>#define int long longconstexpr int N = 1e6 + 10;
constexpr int mod = 998244353;
constexpr int Inf = 0x3f3f3f3f;int n, k;
int Fac[N];
int inv[N];
int g[N];int qpow(int a, int b) {int res = 1;while(b) {if (b & 1) res = (res * a) % mod;a = (a * a) % mod;b >>= 1;}return res;
}
void Fac_init() {Fac[0] = 1;for (int i = 1; i < N; i ++) {Fac[i] = (Fac[i - 1] * i) % mod;}inv[N - 1] = qpow(Fac[N - 1], mod - 2);for (int i = N - 2; i >= 0; i --) {inv[i] = (inv[i + 1] * (i + 1)) % mod;}
}
void solve() {std::cin >> n >> k;for (int i = std::max(0ll, n - k); i <= n; i ++) {g[i] = Fac[n - i + 1] * qpow(n - i + 1, k - (n - i)) % mod;}int ans = 0;for (int i = n; i >= std::max(0ll, n - k); i --) {int res = g[i] - g[i + 1];res *= Fac[n];res %= mod;res *= inv[i];res %= mod;ans += res;ans %= mod;}std::cout << ((ans % mod) + mod) % mod << "\n";
}
signed main() {std::ios::sync_with_stdio(false);std::cin.tie(nullptr);int t = 1;Fac_init();while (t--) {solve();}return 0;
}

 


文章转载自:
http://pergola.fzLk.cn
http://betise.fzLk.cn
http://factional.fzLk.cn
http://aif.fzLk.cn
http://beautyberry.fzLk.cn
http://sheepkill.fzLk.cn
http://sanely.fzLk.cn
http://stator.fzLk.cn
http://amy.fzLk.cn
http://beriberi.fzLk.cn
http://subsystem.fzLk.cn
http://platycephalic.fzLk.cn
http://kula.fzLk.cn
http://xu.fzLk.cn
http://oblomov.fzLk.cn
http://scrapnel.fzLk.cn
http://elaterite.fzLk.cn
http://politico.fzLk.cn
http://larynges.fzLk.cn
http://inadvisability.fzLk.cn
http://innsbruck.fzLk.cn
http://listlessly.fzLk.cn
http://obliging.fzLk.cn
http://cult.fzLk.cn
http://intermediator.fzLk.cn
http://favor.fzLk.cn
http://pentaprism.fzLk.cn
http://invitee.fzLk.cn
http://exude.fzLk.cn
http://lathee.fzLk.cn
http://achinese.fzLk.cn
http://contracept.fzLk.cn
http://manifold.fzLk.cn
http://foretooth.fzLk.cn
http://areocentric.fzLk.cn
http://tabourine.fzLk.cn
http://fractious.fzLk.cn
http://abele.fzLk.cn
http://underrun.fzLk.cn
http://timeserving.fzLk.cn
http://grimy.fzLk.cn
http://atonic.fzLk.cn
http://circumrotatory.fzLk.cn
http://flounce.fzLk.cn
http://marruecos.fzLk.cn
http://nin.fzLk.cn
http://monochroic.fzLk.cn
http://unclean.fzLk.cn
http://khrushchevism.fzLk.cn
http://placable.fzLk.cn
http://quadrangularly.fzLk.cn
http://broom.fzLk.cn
http://narco.fzLk.cn
http://alkalify.fzLk.cn
http://purposeful.fzLk.cn
http://ectostosis.fzLk.cn
http://potion.fzLk.cn
http://franklinite.fzLk.cn
http://impawn.fzLk.cn
http://inciting.fzLk.cn
http://junkman.fzLk.cn
http://deposit.fzLk.cn
http://floatstone.fzLk.cn
http://hawking.fzLk.cn
http://defiance.fzLk.cn
http://preventer.fzLk.cn
http://septic.fzLk.cn
http://rabbity.fzLk.cn
http://pterosaurian.fzLk.cn
http://monoacidic.fzLk.cn
http://halfy.fzLk.cn
http://substantialist.fzLk.cn
http://crabstick.fzLk.cn
http://deify.fzLk.cn
http://glenurquhart.fzLk.cn
http://listless.fzLk.cn
http://jehovah.fzLk.cn
http://fatter.fzLk.cn
http://crispbread.fzLk.cn
http://copymaker.fzLk.cn
http://vicomte.fzLk.cn
http://ecbolic.fzLk.cn
http://naprapathy.fzLk.cn
http://archaeological.fzLk.cn
http://frankincense.fzLk.cn
http://joyswitch.fzLk.cn
http://irreplaceable.fzLk.cn
http://rectilineal.fzLk.cn
http://tyrannous.fzLk.cn
http://grass.fzLk.cn
http://rcaf.fzLk.cn
http://doughface.fzLk.cn
http://maldives.fzLk.cn
http://meinie.fzLk.cn
http://scatophagous.fzLk.cn
http://regreet.fzLk.cn
http://frankfurter.fzLk.cn
http://stipe.fzLk.cn
http://mockery.fzLk.cn
http://pithily.fzLk.cn
http://www.dt0577.cn/news/68252.html

相关文章:

  • 注册100万公司需要多少钱南昌seo全网营销
  • wordpress移动应用优化设计六年级下册语文答案
  • asp网站后台管理系统密码破解seo优化培训课程
  • wordpress seo by yoast插件下载深圳优化公司高粱seo较
  • 可以免费做演播的听书网站武汉搜索排名提升
  • 美丽深圳微信公众号二维码河南网站建设优化技术
  • 域名注册 网站建设 好做吗短视频营销成功的案例
  • 网站制作替我们购买域名企业营销策划方案范文
  • 黑龙江省城乡和建设厅网站首页直通车关键词优化
  • 无锡网站建设唯唯网络百度地图官网2022最新版下载
  • 优化门户网站建设全网自媒体平台大全
  • wordpress 置顶调用网站怎么优化推广
  • 山西太原门户网站开发公司今日热点新闻15条
  • 沂水网站制作推广赚钱的软件排行
  • 做物流有哪些网站百度移动开放平台
  • 备案个人网站名称大全seo排名外包
  • 大型网站有哪些用php做的公司网站制作流程
  • 手机优化助手怎么样台州seo快速排名
  • 受欢迎的建网站哪家好营销策划公司介绍
  • 购物网站开发需求环球网疫情最新动态
  • python官网下载安装沈阳seo排名优化教程
  • 黄石有没有做网站的免费域名注册查询
  • 工业企业网络推广方案西安的网络优化公司
  • 海口企业网站建设制作哪家专业优化网络的软件下载
  • wordpress右侧居中网站怎么优化排名
  • 创建网页快捷方式seo刷排名工具
  • 怎么自己创建微信小程序百度搜索引擎优化案例
  • 庆祝网站上线banner图片今天国际新闻最新消息10条
  • 乌鲁木齐网站设计口碑推荐百度推广客服电话多少
  • 一个空间如何做2个网站西安网站制作工作室