
逆元
bao___zi
ACM 弱鸡一枚
What this era lacks is not the person who is perfect but the person who is with virtue, justice, courage and compassion.
展开
-
Wannafly 挑战赛11 B白兔的式子
题链接:点击打开链接题目描述 已知f[1][1]=1,f[i][j]=a*f[i-1][j]+b*f[i-1][j-1](i>=2,1<=j<=i)。 对于其他情况f[i][j]=0 有T组询问,每次给出a,b,n,m,求f[n][m] mod (998244353) 输入描述:第一行为一个整数T,表示询问个数。接下来一共T行,每行四个整数a,b,n,m。输出描述...原创 2018-03-09 22:41:44 · 201 阅读 · 0 评论 -
Wannafly 挑战赛13 B- Jxc军训
题目描述 在文某路学车中学高一新生军训中,Jxc正站在太阳下站着军姿,对于这样的酷热的阳光,Jxc 表示非常不爽。 Jxc将天空看做一个n*n的矩阵,此时天上有m朵云,这些云会随机分布在m个不同的位置,同时太阳会随机出现在一个位置,Jxc想知道他被太阳晒到的概率是多少,由于他仍在站军姿,所以这个有趣的问题就交给了你。考虑到精度问题,Jxc只需要知道这个概率在对998244353取...原创 2018-04-09 13:05:06 · 200 阅读 · 0 评论 -
Codeforces 964C Alternating Sum
You are given two integers a and b. Moreover, you are given a sequence s0,s1,…,sn. All values in s are integers 1 or −1. It's known that sequence is k-periodic and k divides n+1. In other words, for e...原创 2018-04-18 16:23:24 · 1062 阅读 · 0 评论