justHusam's blog

By justHusam, history, 8 months ago, ,

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 Nada_Shamayleh (Nada Al-Shamayleh).

Thanks to Light (Hamza Zagha), Dehayat (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.

•
• +43
•

 » 8 months ago, # |   +14 The difficulity of problems is Div.3 or Div.2???
•  » » 8 months ago, # ^ |   +4 div 2 + div 3
 » 8 months ago, # |   +14 How to solve problem G-Hard Equation ?
•  » » 8 months ago, # ^ |   0 In problem G, you are required to solve the Discrete Logarithm Problem. You can use the Baby-step giant-step algorithm to solve the problem.
•  » » » 8 months ago, # ^ |   0 How can we calculate modular inverse since it is not necessary that a and m are co-prime.
•  » » » » 8 months ago, # ^ |   0 I'm not sure why computing the inverse step is mentioned in Wikipedia, but it is not necessary. Check this tutorial from GeeksforGeeks.
•  » » » » » 7 months ago, # ^ |   0 The tutorial on GeeksforGeeks also only work when a and m are coprime. Otherwise, the expression is not always true, for example with a = 4, b = 1, m = 10, i = 2, j = 4.I don't know what to do next from here. Any suggestion?
 » 8 months ago, # |   +3 Is there an editorial?
•  » » 8 months ago, # ^ |   +3 I'm not sure if I'll be able to write a tutorial, but I'll do my best.
•  » » » 7 months ago, # ^ |   0 good
 » 8 months ago, # | ← Rev. 3 →   0 how to solve problem E. Maximum Sum ?
•  » » 8 months ago, # ^ | ← Rev. 2 →   +4 You can solve it using dynamic programming. Think of it as if you want to calculate the answer of the of row i, then you only care about which cells you have chosen in the row i - 1. Or you can think if you want to choose cell (x, y), then you only need to check if you have chosen cells (x, y - 1), (x - 1, y - 1), (x - 1, y), and (x - 1, y + 1).
•  » » » 8 months ago, # ^ |   0 thanks!
 » 8 months ago, # |   0 What testcase was added to B after the contest?
•  » » 8 months ago, # ^ |   +2 A contestant sent me a message with a test case that can break some accepted solutions after the contest has ended, so I updated the test cases. I prefer not to tell you about the test case so you can discover your mistake by yourself =D.
 » 8 months ago, # | ← Rev. 2 →   0 how to solve problem A?
 » 8 months ago, # |   0 how to solve B
 » 7 months ago, # |   0 what is the solution for I circles?? its giving tle in test 2
•  » » 7 months ago, # ^ | ← Rev. 3 →   +3 make sure you are using fast I/O, because time limit is very tight if you are using cin with doubles or just take the input as integers not doubles.
•  » » » 7 months ago, # ^ |   0 I used fast io bt used doubles.. Will check for integers.. Thanks
 » 7 months ago, # |   0 any hint for C. intersections??
•  » » 7 months ago, # ^ |   0 you can use reverse order to solve the problem
•  » » » 7 months ago, # ^ |   0 能详细说一些吗
•  » » » » 6 months ago, # ^ |   0 replace elements of array a with its order/index in bFor example: a = [5, 4, 2, 1, 3] b = [2, 5, 4, 1, 3] so we get [1(5 is 1th elem in b), 2, 0, 3, 4] However, I still get WRONG ANS. Anybody open your solution?
 » 7 months ago, # |   0 Can the administrator please open the solution of all users??
•  » » 7 months ago, # ^ |   0 I am agree with you sir!!! Please open solutions as sir demanded.
 » 6 months ago, # |   +3 There are some greedy solutions that do pass on problem B. Check this testcase: 1 4 2 5 10 14 M M F F Solution is 2.
•  » » 6 months ago, # ^ |   0 In the question it is given that all triplets are co-primes but 2,10 and 14 are not co-primes.
•  » » » 6 months ago, # ^ |   0 Right sorry but look at this case: 1 4 10 21 55 6 M M F F Solution is also 2 (pair 10 with 55 and 21 with 6), but wrong greedys will pair 10 with 6, and the 21 can't be paired with 55.Some codes that fail this testcase:code 1code 2code 3code 4
 » 6 months ago, # |   0 https://paste.ubuntu.com/p/77VbmCM8Tg/ can someone say what is wrong with my code? it's the solution for the k problem.
 » 6 months ago, # |   0 why i get TLE in test 3 problem A ?