Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя jhjfbsbfkbjfnfnfjfj

Автор jhjfbsbfkbjfnfnfjfj, история, 4 года назад, По-английски

https://codeforces.net/problemset/problem/1030/D Hello everyone, hope you all are fine. Talking with reference to this question. First of all we need to ensure that 2*m*n is divisible by k for integral points. Secondly , if besides origin two other points were to be a,0 and 0,b so a*b = 2*n*m/k then can we do it like we list down all the factors of 2*n*m/k let those be f1, f2 , ....... ,fn and then taking the leftmost and rightmost then the second-leftmost and second-rightmost and checking if either of left or right is less than <= n and the other is less than <= m. Would this work?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится