Блог пользователя justHusam

Автор justHusam, история, 7 лет назад, По-английски

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

Теги gym
  • Проголосовать: нравится
  • +28
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Great, will there be tutorials after the contest shortly?

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

This contest is intended to do individually or in team?

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What is test 2 in D problem? My solutions uses bitmask+dp.

  • »
    »
    7 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

    Some large random(I guess) test, you can view it using coach mode. My solution is bitmask dp too.

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Can you share your code?

      • »
        »
        »
        »
        7 лет назад, # ^ |
          Проголосовать: нравится +5 Проголосовать: не нравится
        • »
          »
          »
          »
          »
          7 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Thanks, btw what is tricky case for B problem? I did min(n, a * 2 - 1), but i failed.

          • »
            »
            »
            »
            »
            »
            7 лет назад, # ^ |
              Проголосовать: нравится +1 Проголосовать: не нравится

            We reported that. Actually their initial solution was wrong too.

            Consider n = 10, a = 2, then answer is 5[1, 2, 3, 4, 5, 1, 1, 1, 1, 1], but that formula gives 3. Actually any optimal solution is in this format [1, 2, 3, ..., 1, 1, ...]. You can do binary search on the solution.

            Btw, I wonder, did they use same dataset in onsite contest too :3

»
7 лет назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

Isn't problem D just edge weighted Steiner Tree? Is there a better solution than O(Tn3k)?

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I was very unclear on what a subgraph meant in terms of this problem. Got AC with by trying every subset of nodes and finding the minimum spanning tree of those nodes. Throw out subsets that don't include all important vertices.

    What are T, n, and k in your runtime?

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      T, n, k from statement. T = Number of testcases, n = number of nodes, k = number of nodes we need to cover.

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can someone give hint for G problem?

  • »
    »
    7 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    You need to notice that triangles OAD and OBC are similar. After that you need some easy calculatons and using formula P = a·b·sin(x)

    Formula actualy is not so important, but easier for solving (at least to me).

»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

any hint about problem F?

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +2 Проголосовать: не нравится

    2d prefix sums.

  • »
    »
    7 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

    What we need to find is the number which have (n + 1) / 2 numbers less than it in that range where n is the size of submatrix. This can be done using 2D frequency sums of each number(<= 500) and then using another 3D matrix, dp[k][i][j] which denotes no of numbers less than equal to k in the range [1,1] to [i,j]. This matrix along with binary search produce the required answer. https://ideone.com/EnCunm