摘要:
(From:离殇灬孤狼) 这个Lucas定理是解决组合数的时候用的,当然是比较大的组合数了。比如C(1000000,50000)% mod,这个mod肯定是要取的,要不算出来真的是天文数字了。 对于一个组合数C(n,k),它等于 n! / ( k! * ( n - k)! ) 我们要求一个mod。但 阅读全文
摘要:
495. Kids and Prizes Time limit per test: 0.25 second(s) Memory limit: 262144 kilobytes input: standard output: standard ICPC (International Cardboard 阅读全文
摘要:
The dragon and the princess are arguing about what to do on the New Year's Eve. The dragon suggests flying to the mountains to watch fairies dancing i 阅读全文
摘要:
BuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an N-sid 阅读全文
摘要:
There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces. Die3 has K3 阅读全文
摘要:
In 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them meet. Nothing will happen if they are of the same species, tha 阅读全文