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

Автор jaswanthi, 9 лет назад, По-английски

From the problem statement ( Contest is over)

Two boomerang constellations are distinct if they are not made up of the same unordered pair of line segments

What does above mean?

How to solve this problem if the restriction is changed to "if they are made up of same Ordered pair of the line segment" instead of "unordered" ( without hashmap to keep track that we have see it earlier ) ?

  • Проголосовать: нравится
  • -15
  • Проголосовать: не нравится

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

With what I had understood from the problem statement (and my code got AC) , none of your statements are true. In both cases , the boomerang constellations are same

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

    Thanks ( Edited the question) !!, But What does "Two boomerang constellations are distinct if they are not made up of the same unordered pair of line segments" mean ?

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

      I am not very good at English . So maybe I can't explain very well. But when I saw unordered , I did not dive too deep into the technical meaning. I just thought as taking three points where those distance conditions are fulfilled and connected the points to form a boomerang. Two boomerang are different if they do not completely converge with one another. (Taking the sky as a 2D plane)

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

"A line segment is represented by end points on each end of the line segment" --> (1,2)-(2,1) is the same line segment as (2,1)-(1,2)

If the question would have ordered pair, the ans would be just multiplied by 2 as there are 2 different possible ways to represent an unordered pair as ordered pair {1, 2} -> (1,2) & (2,1)