Abu-Gasem1's blog

By Abu-Gasem1, history, 9 years ago, In English

Hey how can i solve this proplem any help please .

Proplem link : http://acm.sgu.ru/problem.php?contest=0&problem=206.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Abu-Gasem1, history, 9 years ago, In English

This Is The Proplem : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1452

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 .

note ( Im Asking For Help Not For DownVotes ).

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Abu-Gasem1, history, 9 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By Abu-Gasem1, history, 9 years ago, In English

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

The Link : (http://codeforces.net/contest/283/problem/A);

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

Sorry For My Boor English . Have A Nice Day.

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By Abu-Gasem1, history, 9 years ago, In English

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

Proplem : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=568

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

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Abu-Gasem1, history, 9 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -7
  • Vote: I do not like it