Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Last active September 1, 2018 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/79e717ee9c85456773f3a87491052eba to your computer and use it in GitHub Desktop.
Save whatalnk/79e717ee9c85456773f3a87491052eba to your computer and use it in GitHub Desktop.
AtCoder ABC #108 B
x1, y1, x2, y2 = gets.chomp.split(" ").map(&:to_i)
x3 = 1 * (x2 - x1) + (-1) * (y2 - y1) + x1
y3 = 1 * (x2 - x1) + 1 * (y2 - y1) + y1
x4 = 1 * (x3 - x2) + (-1) * (y3 - y2) + x2
y4 = 1 * (x3 - x2) + 1 * (y3 - y2) + y2
puts [x3, y3, x4, y4].join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment