求什么动物懂医术术的帮忙解答一下

12:01 提问
高分悬赏,求求大神帮忙解答一下,快崩溃了
代码编译连接都ok,运行半天最后报错 ,就是调用 计算数乘nP的函数Point_Multiply 时就卡住了,单步跟踪到这就执行不下去了。
调试怀疑是内存溢出,水平有限,希望大神们帮帮我
Point Point_Calculate(Point P,Point Q) //点加和倍点加
BigInteger r,temp0(0),temp2(2),temp3(3);
if (Compare(P.x)&&Compare(P.y))
R=Q;return R;
else if (Compare(Q.x)&&Compare(Q.y))
R=P;return R;
else if (Compare(P.x,Q.x))
r=(Q.y-P.y)*Inv(Q.x-P.x,q)%q;
else if (Compare(P.y,Q.y))
R.x=R.y=temp0;return R;
else if (Compare(Q.y))
R.x=R.y=temp0;return R;
r=(temp3*P.x*P.x+a)*Inv(temp2*P.y,q)%q;
R.x=(r*r%q-P.x-Q.x)%q;
if (Compare(R.x,temp0)==-1)
R.x=R.x+q;
R.y=(r*(P.x-R.x)-P.y)%q;
if (Compare(R.y,temp0)==-1)
R.y=R.y+q;
//计算数乘nP,采用重复平方法计算
Point Point_Multiply(Point P,BigInteger n)
BigInteger temp,temp2(2),temp0(0);
int b[160],
result.x=result.y=temp0;//初始化为O点
n.BigNumToIndex(b,count);//得到n的二进制表示
//按重复平方法求解nP
for(int i=count-1;i&=0;i--)
result=Point_Calculate(result,result);
result=Point_Calculate(result,P);
//将大整数转化为二进制数,并不影响*this的值
void BigInteger::BigNumToIndex(int b[],int &count)
BigInteger BigNum=*this,temp2(2),
while (int(BigNum.Head-&Num))
temp=BigNum%temp2;
b[count++]=int(temp.Head-&Num);
BigNum=BigNum/temp2;
//大整数的定义
BigInteger::BigInteger()
//构造函数,将每个节点置空
Head=End=TempNode=NULL;
BigInteger::BigInteger(char i)
//构造函数,只拥有一位的大整数
Head=End=TempNode=NULL;
TempNode=new N
TempNode-&Num=i;
TempNode-&Prev=NULL;
Head=End=TempN
TempNode-&Next=NULL;
BigInteger::BigInteger(const BigInteger &BigNum)
//拷贝构造
Head=End=TempNode=NULL;
p=BigNum.H
AddEnd(p-&Num);
BigInteger::~BigInteger()
Node *NextN
if(Head==NULL)
TempNode=H
while(TempNode)
NextNode=TempNode-&N
delete TempN
TempNode=NextN
Head=NULL;
TempNode=NULL;
void BigInteger::AddHead(char Num)
//在链表头插入节点的操作
TempNode=new N
TempNode-&Num=N
TempNode-&Prev=NULL;
Head=End=TempN
TempNode-&Next=NULL;
TempNode-&Next=H
Head-&Prev=TempN
Head=TempN
void BigInteger::AddEnd(char Num)
//在链表尾插入节点的操作
TempNode=new N
TempNode-&Num=N
TempNode-&Next=NULL;
Head=End=TempN
TempNode-&Prev=NULL;
TempNode-&Prev=E
End-&Next=TempN
按赞数排序
你的Point中的两个点的值的类型是BigInteger ?
你每次去做一些操作的时候都会使用point来保存你的值, 这样无形中就copy了多份
for(int i=count-1;i&=0;i--)
result=Point_Calculate(result,result); //这里就会copy count份 point的值, 而这时虽然是把值付给同一个对象result, 但是却new了多次,
//我觉得你应该将Point_Calculate的返回类型改为引用
result=Point_Calculate(result,P);
以上结论的前提是你的Point中的点是BigInteger类型.
不一定对, 可以参考一下.
如果怀疑是内存溢出的问题,你可以打开任务管理,看看内存的使用情况,运行一段时间,看看内存大小是否是只增不减~
是你数据结构设计的不合理:
你用双向链表表示BigInteger,每位数字用一个char表示,占用一个字节;
还要计算链表的前向、后向两个指针大小,以及包装对象Node的大小,
如果遇到很大在整数时非常占用内存。
你可以去参考java里面BigInteger的实现,内存占用就很少了。
针对你的实现,我也可以给点优化建议:
把Node对象做成不可变对象,其实就只有0-9 10种Node,不需要每次都new Node对象,这样就可以节约很大部分的内存了。
代码不够全,可以发过来给你跑一下试试。
你可以查看一下在程序crash的时候,上下文中的参数值都是什么。打开core dump.
你把数据的存储在优化一下,或是全局变量都要用的话,就设置成static,不需要的话,用完之后直接进垃圾站
把出错的堆栈信息贴出来
这是的话多长时间才能赚到你的这单
10种Node对象缓存起来,每次直接取对应的数字,不需要每次去new 对象
你好, Point_Multiply 有具体实现代码,单步跟踪到这就执行不下去了。
1、具体是执行到哪一行卡住的?
2、是不是条件问题出现了死循环?
3、怀疑内存溢出,有没有关注内存的变化确认呢?
4、CPU占用是否正常?
//将大整数转化为二进制数,并不影响*this的值
void BigInteger::BigNumToIndex(int b[],int &count)
BigInteger BigNum=*this,temp2(2),
while (int(BigNum.Head-&Num))
//temp不是一个BigInteger的变量吗?你这个%求于是怎么回事?%这个求于只能对于普通变量进行操作吧?
这段代码看起来头昏脑涨的。
temp=BigNum%temp2;
b[count++]=int(temp.Head-&Num);
BigNum=BigNum/temp2;
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐(ERROR:15) & 访客不能直接访问免费发布咨询,坐等律师在线服务
需求发布后
10分钟内收到律师在线回复
平均有多个律师参与回复
得到了圆满解决
您的位置: &
请懂法律的人士帮忙解答一下,谢谢
我是2008年4月份进公司的,一直没有签合同,一年后才补回,2009-年3月份开始以现金方式补回社保费96元我,但我不是本市自己买不了,一年前的社保可以要求公司补缴吗,《但劳动局那边说我已经在2009年3月份收了公司的社保现金,是无法追回,是这样的吗?》国家规定有3个月的,但给了我一个月的产假工资,而且公司还要求我写请一个月产假,二个月事假,公司以为这样逼我写请假条不用给产假工资,而且我分娩刚好提前15天生,有医院的证明,国家规定一周工作不超过40小时,公司安排周六加班3.5小时,但公司不承认加班,我有相关证据 调解未达成协议,我已经申请了被申请人交给劳动局的意见书有以下几方面:确认申请人的基本工资及工作岗位,不确认其入职时间。关于问题,被申请人称不确认其存在加班,所心不同意支付;关于社保及产假工资的问题,被申请人称已经以现金的方式支付给申请人,所以不同意申请人的请求;关于的问题,被申请人尚未提及,并称申请人在职期间多次违反公司制度,且产假过后未有提出解除其劳动关系,所以不存在赔偿的问题,《在休完产假前一天我于电话方式打电话给老板要求回去上班,但老板于公司生意不好,说下个月公司会倒闭,叫我不要回去上班,但当时我没有将通话的过程录下,无法证明他说的这番话》上到仲我该如何回答对方律师。
律师回答地区:广东-中山咨询电话:13189***帮助网友:1598 次点赞人数:<span class="s-c666" id="r_ 人你有权要求公司支付因未签劳动合同应支付的双倍工资。 16:18
推荐律师:
猜你感兴趣
无锡推荐律师后使用快捷导航没有帐号?
本贴相关题目
In Kantovia, physicians' income comes from insurance companies, which require physicians to document their decisions in treating patients and to justify deviations from the companies' treatment guidelines. Ten years ago physicians were allowed more discretion. Most physicians believe that the companies' requirements now prevent them from spending enough time with patients. Yet the average amount of time a patient spends with a physician during an office visit has actually increased somewhat over the last ten years.
Which of the following, if true, most helps to resolve the apparent discrepancy between physicians' perceptions and the change in the actual time spent?
APatients are more likely to be in a hurry nowadays and are less willing to wait a long time to see their physician.&&BPhysicians today typically have a wider range of options in diagnosis and treatment to consider with the patient before prescribing.&&CPhysicians are increasingly likely to work in group practices, sharing the responsibility of night and weekend work.&&DMost patients would rather trust their physicians than their insurance companies to make decisions about their treatment.&&ESince the insurance companies pay physicians a set amount for each office visit, it is to physicians' financial advantage to see as many patients as possible.&&
正确答案: B
更多相关帖子
查看: 1903|回复: 3
在线时间 小时
In Kantovia, physicians’ income comes from insurance companies, which require physicians to document their decisions in treating patients and to justify deviations from the companies’ treatment guidelines. Ten years ago physicians were allowed more discretion. Most physicians believe that the companies’ requirements now prevent them from spending enough time with patients. Yet the average amount of time a patient spends with a physician during an office visit has actually increased somewhat over the last ten years.& && &Which of the following, if true, most helps to resolve the apparent discrepancy between physicians’ perceptions and the change in the actual time spent?
A.& & Patients are more likely to be in a hurry nowadays and are less willing to wait a long time to see their physician.B.& & Physicians today typically have a wider range of options in diagnosis and treatment to consider with the patient before prescribing.C.& & Physicians are increasingly likely to work in group practices, sharing the responsibility of night and weekend work.D.& & Most patients would rather trust their physicians than their insurance companies to make decisions about their treatment.E.& &&&Since the insurance companies pay physicians a set amount for each office visit, it is to physicians’ financial advantage to see as many patients as possible.
这是GWD16里的题。我的理解是,医生们觉得病人和医生接触的时间会减少,但是实际上却是增加的。然后答案选B,但是我不懂为什么医生在开药之前的诊断时有很多选择就能解释这个问题呢?求大家帮忙解答一下啊!!谢谢!!!
在线时间 小时
本帖最后由 alzn2765 于
15:42 编辑
受到版主鼓励,打鸡血!
类比推理找加强
题干给出了10年之前(不知道为什么想起了陈奕迅的《10年》)和今天的问诊时间的变化:
10年之前:问诊时间短
现在:问诊时间变长了
答案一定是讲10年前与现在的某些不同导致的:可能是10年前的physicians和现在的physicians的区别,也可能是10年前的病人和现在的病人的区别,总之必须是可以导致问诊时间变长的一个直接或者间接参与者,一定不可以只讲10年前或者只讲现在的选项。所以排除DE,这两个选项没有涉及比较。
A是削弱,反向答案
C说的是现在的physicians和10年前的physicians的比较,不过这跟问诊时间的长短任何没有关系,无关。
现在说B到底是什么意思:
注意这句话: which (insurance companies)require physicians to document their decisions in treating patients and to justify deviations from the companies’ treatment guidelines.
B说的是Physicians today typically have a wider range of options in diagnosis and treatment to consider with the patient before prescribing
这两句的意思就是现在保险公司要求physicians记录下治疗并且给出采取这个治疗而不采取保险公司提供的建议治疗的原因。B说现在physicians在开药之前有很多可以考虑的诊疗程序。
我靠!说人话吧!
举个例子:
10年以前A病的确诊程序就一个(看眼睛),治疗就是吃屎。现在在确诊程序变成10个(看眼睛,看喉咙,看屁眼。。。),治疗有吃屎,喝尿,喝血。。。。而physicians要把这10个确诊过程都记下来,还要写为什么让病人吃屎,而不是喝尿喝血,不然保险公司不给钱啊!你说问诊的时间是不是会变长?其实就是文字工作变多了。
在线时间 小时
受到版主鼓励,打鸡血!
类比推理找加强
谢谢!!!!
在线时间 小时
In Kantovia, physicians’ income comes from insurance companies, which require physicians to document their decisions in treating patients and to justify deviations from the companies’ treatment guidelines. Ten years ago physicians were allowed more discretion. Most physicians believe that the companies’ requirements now prevent them from spending enough time with patients. Yet the average amount of&&time a patient spends with a physician during an office visit has actually increased somewhat over the last ten years.
医生收入源于保险公司,保险公司需要医生记录病人情况。大多数医生认为和病人相处的时间会减少,但是平均总的和病人相处的时间增加。
文章分析:平均总的和病人相处的时间会增加。医生在病人身上投入的时间分为诊断前、诊断中以及诊断后。只要这三个时间总量增加,那么就可以解决问题。
Which of the following, if true, most helps to resolve the apparent discrepancy between physicians’ perceptions and the change in the actual time spent?
A.& &Patients are more likely to be in a hurry nowadays and are less willing to&&wait a long time to see their& &physician.
B.& &Physicians today typically have a wider range of options in diagnosis and treatment to consider with the patient before prescribing.
& & &&医生要花时间在诊断、记录方面。应保险公司的要求,记录时间增加,诊断时间相对要考虑更多的因素,总的平均时间确实增加的。
& && & 因为在诊断之前,需要考虑的因素比以前要多了,因此所需要的时间也会变多。
C.& &Physicians are increasingly likely to work in group practices, sharing the responsibility of night and weekend work.
D.& &Most patients would rather trust their physicians than their insurance companies to make decisions about their treatment.
E.& &Since the insurance companies pay physicians a set amount for each office visit, it is to physicians’ financial advantage to see as many Patients as possible.
& && & 即使是优势,但是却是否实施,选项没告诉医生的实施情况。属于理论层面。
& && &看得病人多 ≠和病人相处的时间多,可能不变。一天工作12小时,看12个人和看20个人没区别。
所属分类: GMAT考试
正在浏览此版块的会员 ()
ChaseDream 论坛
All Rights Reserved.我的长安之星2代 水温高?风扇叶也不转?新换的防冻液和水箱,求懂的帮忙解答一下,谢谢_百度知道
我的长安之星2代 水温高?风扇叶也不转?新换的防冻液和水箱,求懂的帮忙解答一下,谢谢
&#xe6b9;答题抽奖
首次认真答题后
即可获得3次抽奖机会,100%中奖。
天气热你开空调散热风扇就会一直转,正常现象,你可以试试清理一下车前方散热器和冷凝器,让发动机保持一个正常的工作温度。
只针对已购车用户,提供汽车保养、简单维修咨询;企业有专职客服及维修师傅专家团,一起解决用户在用车、养车遇到的问题。专注已购车车主的保养、维修问题。
建议您去修理厂检查水泵,节温器,电子扇及相关线路是否存在故障,以上问题都有可能造成你所说的那种现象。逐个排查就可以解决问题的。【汽车有问题,问汽车大师。4S店专业技师,10分钟解决。】
修理工陶陶
修理工陶陶
擅长:暂未定制
长安车93度风扇才会转!建议看下节温器!还有水里面的空气排完没!
节温器已经下了 都不行,空气也排完了 ,风扇还是不转
那就只有用解码器了!看水温数据流!如果水温十分钟之类上不来就说明水温传感器坏了!如果传感器数据对的那就说明风扇线路问题!
只针对已购车用户,提供汽车保养、简单维修咨询;企业有专职客服及维修师傅专家团,一起解决用户在用车、养车遇到的问题。专注已购车车主的保养、维修问题。
你好。检查一下风扇保险。继电器。风扇【汽车有问题,问汽车大师。4S店专业技师,10分钟解决。】
其他1条回答
为你推荐:
其他类似问题
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 有懂医术的软件 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信