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

有个地方要注意下,第t+1状态(虽然不存在)会影响第t个状态,递推时要注意

Posted by yzhw at 2009-04-18 09:24:11 on Problem 1104
In Reply To:想自虐,一个地方把i写成1WA了N多次,附AC代码 Posted by:yzhw at 2009-04-18 09:20:55
while(1)
{
		  
     flag=0;
     for(i=2;i<=t;i++)
     {
	if(reset1(i)) flag=1;//正推
     }
     for(i=t;i>=1;i--)
     {
	if(reset2(i)) flag=1;//逆推,这里注意,是从t down to 1,不是t-1 down to 1
     }
     if(!flag) break;
}

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