justHusam's blog

By justHusam, 5 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2019 JUST Programming Contest of Jordan University of Science and Technology. The contest was originally held on $$$23^{rd}$$$ of March, and it will launch in Codeforces Gym on Friday, 29 March 2019, 13:00 UTC.

The problems were prepared by justHusam (Husam Musleh), Aristos (Hamzeh Sahyoun), Lvitsa (Alaa Abu Hantash), H2A_TLE (Asem Al-Radaideh), and Thunder_r (Bara' Al-jawarnEh).

Thanks to Mockingjay (Sarah Abu Elayyan) 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 to everyone, and I wish you all accepted solutions!

Update: Registration is now open.

Update: The contest has ended. Congratulations to all participants!

You can check the scoreboard of the onsite contest on the following link.

Full text and comments »

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

By justHusam, 5 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2018 Arabella Collegiate Programming Contest. The contest was originally held on 28th of April, and it will launch in Codeforces Gym tomorrow Saturday, 03 November 2018 10:00 UTC.

The problems were prepared by justHusam (Husam Musleh), Lvitsa (Alaa Abu Hantash), Kilani (Mohammad Kilani), Roze (Nada Al-Shamayleh), AbedAbuhijleh (Abed Abuhijleh), H2A_TLE (Asem Al-Radaideh), and Jester (Ahmad Jaber).

Thanks to Hasan0540 (Hasan Alhamsh), Ptrq (Mohammad Dehayat), and MohammadZuhair (Mohammad Zuhair) for testing the problem set.

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

Good luck to everyone, and I wish you all accepted solutions.

UPD: Registration is currently open.

Full text and comments »

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

By justHusam, history, 6 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2018 JUST Collegiate Programming Contest. The contest was originally held on 31st of March, and it will launch in Codeforces Gym on Saturday 28 July 2018 10:00 UTC.

The problems were prepared by justHusam (Husam Musleh), Lvitsa (Αlαα Abu Hantash), and Roze (Nada Al-Shamayleh).

Thanks to Dark (Hamza Zagha), Ptrq (Mohammad Dehayat), and AbedAbuhijleh (Abed Abu-Hijleh) 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 to everyone, and I wish you all accepted solutions.

UPD: Registration is currently open.

Full text and comments »

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

By justHusam, history, 6 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2018 JUST Programming Contest 1.0 of Jordan University of Science and Technology. The contest was originally held on 17th of March, and it will launch in Codeforces Gym tomorrow Friday 13 April 2018 13:00 UTC.

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

Thanks to MahmoudHamdyY (Mahmoud Hamdy) for sharing the idea of one problem.

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: During the contest today, and after 2 hours and 51 minutes, we received a notification from a team that the author's solution to problem B. Ran and the Lock Code is wrong. Immediately, we checked our solution with respect to their test case to figure out what is the error. It turns out that the solution's idea is totally wrong. So, we have updated the solution and rejudged all the submissions. Since we rejudged all the submissions 15 minutes before the end of the contest, we increased the contest's duration by 30 minutes. We are really sorry for this error. Finally, I would like to thank team Ruhan Habib Fan Club and its members: Rezwan.Arefin01, Alpha_Q, and Bruteforceman for reporting the error.

UPD: Tutorial

Full text and comments »

Tags gym
  • Vote: I like it
  • +28
  • Vote: I do not like it

By justHusam, 7 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2017 JUST Programming Contest 4.0 of Jordan University of Science and Technology. The contest was originally held on 16th of September , and it will launch in Codeforces Gym tomorrow Saturday 23 September 2017 14:30 UTC.

The problems were prepared by justHusam (Husam Musleh) and Vendetta. (Ibraheem Tuffaha).

Thanks to I-Love-Islam (Rami Sadaka) and The-Legend (Abdulmajeed Alzoubi) for sharing the ideas of two problems.

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.

Note: Don't forget to use fast I/O methods.

UPD: Registration is currently open.

UPD: The contest will start in 30 minutes.

UPD: Tutorial

Full text and comments »

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

By justHusam, 7 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2017 JUST Programming Contest 3.0 of Jordan University of Science and Technology. The contest was originally held on 26th of August , and it will launch in Codeforces Gym on Wednesday 30 August 2017 15:00 UTC.

The problems were prepared by Vendetta. (Ibraheem Tuffaha), justHusam (Husam Musleh), Lvitsa (Αlαα Abu Hantash), and voxel (Mohammad Al-Tahhan).

The duration of the contest is 4.5 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.

Full text and comments »

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

By justHusam, 7 years ago, In English

Hello Codeforces,

I would like to invite you all to participate in the 2017 ACM Amman Collegiate Programming Contest (AmmanCPC 2017). The contest was originally held on 19th of August, and it will launch in Codeforces Gym on Friday 25 August 2017 14:00 UTC.

The problems were prepared by Hasan0540 (Hasan Alhamsh), justHusam (Husam Musleh), alfadel (Ali Fadel), Lvitsa (Αlαα Abu Hantash), and flerynn (Yosef Darwish).

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.

Full text and comments »

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

By justHusam, history, 7 years 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 Lvitsa (Α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.

Full text and comments »

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

By justHusam, history, 8 years 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.

Full text and comments »

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

By justHusam, 9 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?

Full text and comments »

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

By justHusam, 9 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

Full text and comments »

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

By justHusam, 9 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 :( ?

Full text and comments »

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