79130947

Date: 2024-10-27 16:06:12
Score: 1
Natty:
Report link

Array bounds: your loop for (int i = 0; i <= n; ++i) is going to cause you all sorts of trouble because you're accessing out of bounds on xi and yi. arrays in c++ are zero-indexed, so you should loop from 0 to n-1. Like this: for (int i = 0; i < n; ++i).

This fixes the issue.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Epidermis