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 |
是不是这样搞?(貌似这是必要性,充分性未能证明)(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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator