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

是不是这样搞?(貌似这是必要性,充分性未能证明)

Posted by gzw_02 at 2008-05-29 14:10:38 on Problem 1021 and last updated at 2008-05-30 15:10:44
(1)分别对graph A和graph B用DFS分割出各个"孤立的group",统计出每个group的元素数目(number) 
(2)for each group ga in graph A do 
  {   
        for each element ea in ga do
        {
           record each track's length by 4 directions in a table ta 
        }
        find = false;
        for each group gb which element number is equal to ga in graph B do
        {
                 for each element eb in gb do 
                 {
                     record each track's length by 4 directions in table tb
                 }
        if(ta==tb) 
          {
           find=true;
           break;
           } 
        } 
  if (find==false) cout<<"NO"<<endl;
}
   cout<<"YES"<<endl;

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