Good evening!

I have been given the task: 2 coordinates of one segment are entered, then another, YES should be output if they intersect, and NO if not. Example:

input:

0 0 1 1 2 0 1 1

conclusion:

YES

Here is my code that is not working on the test specified there , tell me what the problem is?

  • Tl; dr. And you did not try to go under the debugger? - VladD

1 answer 1

@Hashirama , incorrect work with vectors, starting from the definition and ending with going beyond it (I didn’t check the rest). If this is your code, then at least you checked it step by step while writing. Already from the first lines of the program should fall at startup.