### Abu-Gasem1's blog

By Abu-Gasem1, history, 5 years ago,

Hey how can i solve this proplem any help please .

• 0

By Abu-Gasem1, history, 5 years ago,

Im Trying To Solve This Proplem And Still Getting TLE (Using Edmond Karp Algo) And I try To use Ford-Fulkerson

Algo i got WA can any one help is there any way to implement Edomng karp algo to solve this proplem

note : i tried to use AdjList with Edmon Karp And Still Getting TLE.

This Is The Code : http://ideone.com/Sk1fKN.

Explaning For The Code :

First I Connect The members with parties ( Flow[party][member] = 1).

Second I Connect The clubs with members ( Flow[members][clubs] = 1).

Third I connect The Sink ( wich equal 2 here ) With The Club ( Flow[clubs][2] = 1).

Fourth And Last I connect the party With The source ( Flow[source][party] = The Size of Clubs — 1 / 2 ).

And Then Run The Edmond Karp Algo

And Then I Get TLE.

I'm Asking For Help Because Im Trying To Solve This Proplem From Yesterday

Thanks .

• 0

By Abu-Gasem1, history, 5 years ago,

Hey.

Edmonds Karp’s Algorithm :

" It runs in O(VE2) as it can be proven that after O(VE) BFS iterations, all augmenting paths will already be exhausted. "

Can Any One Give A Proof !

Thanks For All.

• -11

By Abu-Gasem1, history, 5 years ago,

Hey My Quesiotn Is About Segment Tree.

I Already Read The source code for it From Comptetive Prog 3 But What I need to know is how to Do The Lazy Updating Or The Lazy Teqh.

Can Any One Give And Example So I Can UnderStand This Teqh Im Facing A Proplem With UnderStanding This Teqh.

And Another Thing Im Wondring If I Can Solve This Proplem Using Segment Tree

My Submission : (http://codeforces.com/contest/283/submission/12340325)

Sorry For My Boor English . Have A Nice Day.

• -3

By Abu-Gasem1, history, 5 years ago,

Im Trying To Solve This Proplem But Im Getting RunTime Error can Any One Help ?

Code : http://ideone.com/nFDvYI Thanks .

• 0

By Abu-Gasem1, history, 5 years ago,

i saw a plug in on TopCoder Named by Greed plug in Can I Get A plug in works like The Greed TopCoder Plug in With CodeForces i Saw Petr on youtube using something like that thanks verymuch :D