6 ms·
LOL. For any two integer points P(i, j), Q(l, m). We have the equation of a line: y - j = ((m - j) / (l - i)) * (x - i) Choose x = k * (l - i) + i y = k*(m -
by mycsc 13y ago
LOL. For any two integer points P(i, j), Q(l, m). We have the equation of a line:
y - j = ((m - j) / (l - i)) * (x - i)
Choose x = k * (l - i) + i
y = k*(m - j) + j
Since i, j, l, m, k are all integers we obtain another integer point. No need 5 points... I may misunderstand the question. :(