Advertisement
Guest User

Untitled

a guest
Jun 6th, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. #Hide the Off-Topic Minecraft Server Post
  2.  
  3. ###Introduction
  4.  
  5. Let's suppose there was a user that wanted to make a post on the meta PPCG site about a PPCG Minecraft server, but couldn't because that is off-topic.
  6.  
  7. In this challenge we're going to hide that post on the main site in a place where the PPCG moderators cannot find it and shut it down. This way our user will still be able to alert the masses about his Minecraft server, but the post cannot be closed!
  8.  
  9. PPCG can be thought of as a field of dimensions `n` by `m`. Our secret off-topic post occupies a single point in the field (`x`, `y`).
  10.  
  11. _[Todo: image]_
  12.  
  13. The field will also contain _moderators_. Moderators also occupy a point, and they have a vision range which is a sector `L,M,R` where `L` is the initial angle, `M` is the final angle, and `R` is the radius. 0 degrees in this challenge is to the right, and 90 degrees is upwards. If the post is placed in a point that is within the vision radius of a moderator, that moderator will instantly delete the post.
  14.  
  15. _[Todo: image]_
  16.  
  17. However, the field may also contain _blocks_. Blocks occupy an area `x1, x2, y1, y2`. Blocks will block the vision range of a moderator -- the moderator cannot see into any point `x,y` if the line between the moderator's current position and `x,y` crosses a block.
  18.  
  19. _[Todo: image]_
  20.  
  21. Given some dimensions, a list of moderators, and a list of blocks, find the position to place the Minecraft server post so that it is not able to be deleted by a moderator.
  22.  
  23. ###Input Description
  24.  
  25. The first line of input shall be the dimensions of the field -- two space separated integers `n` and `m`. E.g:
  26.  
  27. 10,10
  28.  
  29. The second line of input shall be the list of moderators. This is some amount of space separated comma separated tuples in the form `x,y,L,M,R`:
  30.  
  31. 2,1,0,45,3 10,10,180,270,3
  32.  
  33. The third line of input shall be the list of blocks. This is some amount of space separated comma separated tuples in the form `x1,x2,y1,y2`:
  34.  
  35. 3,2,5,2 0,1,10,9
  36.  
  37. ###Output Description
  38.  
  39. Output _any_ point where the post can be placed to avoid deletion by moderator. If no point exists, instead output `ask on chat`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement