Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:应该改一下才好

Posted by TangMing at 2008-07-24 20:29:07 on Problem 1017 and last updated at 2008-07-24 20:29:36
In Reply To:Re:思路较简单的程序(可能比较笨的办法).做不出的可以参考参考. Posted by:whd0810 at 2008-05-16 20:38:42
                 if(a[2]<=5) a[1]=a[1]-27-a[2]*4;//这里的-27-a[2]*4应该改为-27+a[2]*4;
> 				else a[1]=a[1]-7;
> 			if(a[3]%4==2)
>                 if(a[2]<=3) a[1]=a[1]-18-a[2]*4;//这里的-18-a[2]*4应该改为-18+a[2]*4;
> 				else a[1]=a[1]-6;
> 			if(a[3]%4==3)
>                 if(a[2]<=1) a[1]=a[1]-9-a[2]*4;这里的-19-a[2]*4应该改为-18+a[2]*4;
> 				else a[1]=a[1]-5;
我看这样才更准确,虽然两个都AC了

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator