← RoseCode

ROSECODE 316

Bonus for p315

sinan · Math ·

We define a needle-like primitive convex quadrilateral as follows:
  • It has 4 vertices on lattice points
  • It has no other lattice points inside or onside
  • Find such a quadrilateral with the maximum possible perimeter in x2 + y2 = R2 circle for R=108? Answer format: x1,y1,x2,y2 where |xi| ≥ |yi| and x1 < x2 (See the example below) Example: 3,2,5,3 if R = 5 There are more than one solutions. Enter the two vectors that identify them. For example A(-4,-3); B(-1,-1); C(4,2); D(1,0) is a solution then the two vectors are AB=DC=[3,2] and BC=AD=[5,3] Similarly, for A(-4,-2); B(-1,0); C(4,3); D(1,1) AB=DC=[3,2] and BC=AD=[5,3] [My timing: 30s]