Skip to content

Instantly share code, notes, and snippets.

@ninoseki
Last active August 29, 2015 14:17
Show Gist options
  • Save ninoseki/a7c3abb79dbff4bcf3ec to your computer and use it in GitHub Desktop.
Save ninoseki/a7c3abb79dbff4bcf3ec to your computer and use it in GitHub Desktop.
Codeforces#291 Div2-B
# http://codeforces.com/contest/514/problem/B
require 'set'
n, x0, y0 = gets.split.map(&:to_f)
set = Set.new
n.to_i.times do
x, y = gets.split.map(&:to_f)
if x == x0
set << true
else
set << (y - y0) / (x - x0)
end
end
puts set.length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment