| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:附上一点代码In Reply To:搞了半天 总算AC了 大家一定要注意初值啊 Posted by:Tidus5 at 2009-04-26 13:59:32 附上代码 给迷茫的人一点参考吧 大牛就不要笑我了
while(t!=0)
{
ch=getchar();
scanf("%s%s",&buf,&temp);
if(compare(temp,high)==true && t<phigh)
phigh=t;
if(compare(temp,low)==true && t>plow)
plow=t;
if(compare(temp,right)==true)
{
if(t>plow && t<phigh)
{
cout<<"Stan may be honest"<<endl;
plow=0;
phigh=11;
}
else
{
cout<<"Stan is dishonest"<<endl;
plow=0;
phigh=11;
}
}
cin>>t;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator