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:为什么枚举边的时候必须为容量为0,我们从源点和汇点dfs分别染色,难道满足条件的边不是两个点颜色不一样就足够了吗?

Posted by 962861784 at 2011-05-30 15:08:43 on Problem 3204
In Reply To:为什么枚举边的时候必须为容量为0,我们从源点和汇点dfs分别染色,难道满足条件的边不是两个点颜色不一样就足够了吗? Posted by:dut200901102 at 2011-03-02 22:30:19
> for(int i=0;i<n;++i)
>     {
>         for(int j=box[i];j!=-1;j=edges[j].next)
>         if(!(j&1)&&id[i]+id[edges[j].to]==3)//S能到达的染为1,能到达T的染为2
>         ans++;
>     }
> 这样写WA
> for(int i=0;i<n;++i)
>     {
>         for(int j=box[i];j!=-1;j=edges[j].next)
>         if(!(j&1)&&id[i]+id[edges[j].to]==3&&edges[j].c==0)
>         ans++;
>     }
> 这样写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