jaswanthi's blog

By jaswanthi, 8 years ago, In English

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 ) ?

  • Vote: I like it
  • -15
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    8 years ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    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 ?

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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)

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

"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)