| ||||||||||
| 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:我每次提交1067都说我Output Limit Exceed,我检查不出来,能帮忙看看吗?In Reply To:我每次提交1067都说我Output Limit Exceed,我检查不出来,能帮忙看看吗? Posted by:20050503 at 2006-12-03 20:12:28 你的程序死循环的吧……去看一下1001的hint
> #include<iostream>
> using namespace std;
>
> int main()
> {
> long i, j;
> long min, max;
>
> cin>>i>>j;
> while(i >= 0 && j>=0)
> {
> max = (i>j)?i:j;
> min = (i>j)?j:i;
> if(max == min || min == 0)
> {
> cout<<1<<endl;
> goto step;
> }
> if(max != int(min*1.618+1))
> {
> cout<<1<<endl;
> goto step;
> }
> if(min == int((max - min)*1.618))
> cout<<0<<endl;
> else
> cout<<1<<endl;
> step: cin>>i>>j;
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator