摘要: 链接 :。。 zbr说这是签到,看了半天没看出来, 题解: 我们要这么考虑。。 单独把M个数和X搞出来 一共(m+1)!种排列 然后x在最后的有m!种 然后我们发现x在最后的排列数量为m!/(m+1)! 也就是占比 1/(m+1) 所以在N!中,也是占比这么多 所以最终答案就是n!/(m+1) 强啊 阅读全文
posted @ 2020-09-12 23:38 摸鱼选手LLF 阅读(130) 评论(0) 推荐(0)
摘要: 优先队列默认由大到小,由小到大可以为 priority_queue<int,vector<int>,greater<int> > q; typedef struct node { int pi; int di; bool operator < (const node &b)const { if(pi 阅读全文
posted @ 2020-09-12 20:29 摸鱼选手LLF 阅读(172) 评论(0) 推荐(0)