![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
高精度问题
文章平均质量分 75
nianiajr
http://www.liangjiarui.com/
展开
-
高精度运算类bign(非负整数)模板
#include #include using namespace std; const int maxn = 200; struct bign{ //定义类结构bign int len, s[maxn]; bign() { //bign()称为构造函数,目的在于对该储存大数的数组进行初始化 memset(s, 0, sizeof(s));原创 2013-02-21 23:41:22 · 981 阅读 · 0 评论 -
hdu 4762
分蛋糕,求所有草莓落在一块蛋糕上的概率,假设其中一颗草莓在一块蛋糕上,剩下的n-1颗草莓与其落在同一区域的概率就是(1/m)^(n-1);最后再乘上草莓数即Cn即可出解,不过这里数据很大得用到高精度计算。 #include #include #include using namespace std; struct bign{//高精度运算类 int len, s[30];原创 2013-10-02 18:54:22 · 793 阅读 · 0 评论