Abu-Gasem1's blog

By Abu-Gasem1, history, 4 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.

Read more »

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

By Abu-Gasem1, history, 4 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 ).

Read more »

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

By Abu-Gasem1, history, 4 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.

Read more »

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

By Abu-Gasem1, history, 4 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.com/contest/283/problem/A);

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

Sorry For My Boor English . Have A Nice Day.

Read more »

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

By Abu-Gasem1, history, 4 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 .

Read more »

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

By Abu-Gasem1, history, 4 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

Read more »

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

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

Im Trying To Solve This Proplem But Gives Me Wrong Answer On Test Case 2 And I CAnt See The Case (Gym Proplem) http://codeforces.com/problemset/gymProblem/100685/F This Is THe Proplem This Is The Code https://ideone.com/GG7bUl Thanks..

Read more »

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