You are viewing a single comment's thread. Return to all comments →
My javascript solution (two liner, could easily be one):
function main() { const points = Array(+readLine()).fill().map(_ => readLine().split(' ').map(x => +x)); console.log([0, 1].some(x => points.every((y, _, arr) => y[x] == arr[0][x])) ? 'YES' : 'NO'); }
Seems like cookies are disabled on this browser, please enable them to open this website
Points On a Line
You are viewing a single comment's thread. Return to all comments →
My javascript solution (two liner, could easily be one):