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 twilight at 2008-12-07 17:57:10 and last updated at 2008-12-07 18:02:11
In Reply To:弱问b怎么做? Posted by:Jaakques at 2008-12-07 17:48:05
d[i]表示点i的度,c[i]是i的覆盖数

对于每条边(u,v),d[u]++,d[v]++

对于每个u,满足d[u]==1,则对他的邻接点v,c[v]++

如果存在i使得d[i]==0,无解
如果存在i使得c[i]>1,无解

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