justHusam's blog

By justHusam, history, 7 weeks ago, In English,

Hello Codeforces,

I would like to invite you all to participate in the 2017 JUST Programming Contest 2.0 of Jordan University of Science and Technology. The contest was originally held on 1st of April, and it will launch in Codeforces Gym tomorrow; Friday 7 April 2017 13:00 UTC.

The problems were prepared by Alaa_AbuHantash (Αlαα Abu Hantash) and justHusam (Husam Musleh).

Thanks to Vendetta. (Ibraheem Tuffaha) for testing the problem set.

The duration of the contest is 4 hours, and the registration will be open 6 hours before the start of the contest.

Good luck for everyone, and I wish you all Accepted solutions.

UPD: Registration is currently open.

UPD: The contest will start in 30 minutes.

Read more »

 
 
 
 
  • Vote: I like it  
  • +42
  • Vote: I do not like it  

By justHusam, history, 12 months ago, In English,

Today I was solving this problem 632C - The Smallest String Concatenation.

The judge's response for this code 18114819 was Runtime error on test 8.

Then I changed only the last line in the sort comparison function (comp function) from (return true) to (return false) (code: 18114847), and the judge's response was Accepted.

Does anyone have an explanation for that?

Thank you.

Read more »

 
 
 
 
  • Vote: I like it  
  • +1
  • Vote: I do not like it  

By justHusam, 2 years ago, In English,

I’m trying to solve this problem, I tried two different ways to solve it, but I got wrong answer for both of them.

  • First way: delete from the graph all edges that don’t belong to a path of length <= k, then run max-flow min-cut. code
  • Second way: run max-flow min-cut using Ford–Fulkerson method, and I will stop when the shortest path between the source and the sink is bigger than 2*k (here I multiply k by 2 because there’s an extra edge for every node to save its own capacity). code

Please can anyone tell me what’s wrong in my ideas? And can anyone give an idea to solve this problem?

UPD: Any help please?

Read more »

 
 
 
 
  • Vote: I like it  
  • +16
  • Vote: I do not like it  

By justHusam, 2 years ago, In English,

Given a weighted, undirected graph. How I can find 2 paths from S to T, such that they don't share any edge (but may share some nodes), and sum of their lengths must be minimal possible ??

Edit: The problem has been solved using Minimum-cost flow. Thanks for Govikhuu

Read more »

 
 
 
 

By justHusam, 3 years ago, In English,

How i can use array instead of stack in tarjan algorithm ?? i tried to implement something but i'm getting run time error and i don't know why :( ?

Read more »

 
 
 
 
  • Vote: I like it  
  • +4
  • Vote: I do not like it