Problem with code

[USACO](https://USACO problem)
I was unable to figure out what was wrong with my code. This is what I wrote:

#include
#include
#include

using namespace std;

int main(){
ifstream fin (“teleport.in”);
ofstream fout (“teleport.out”);
int start{};
int end{};
int tele1{};
int tele2{};
fin >> start >> end >> tele1 >> tele2;
if (tele2 < tele1)
swap(tele2, tele1);
if (abs(end - start) < abs(tele1 - start) + abs(end - tele2)){
fout << abs(end - start);
}
else
fout << abs(tele1 - start) + abs(end - tele2);
return 0;
}

If somebody could help me that would be great. For some reason this code fails on one of the tests.

The headers for some reason didn’t show up but they are
fstream
cmath
algorithm

https://forum.usaco.guide/t/how-to-ask-for-help-on-a-problem/338/2

the editorial states, quote

This problem is relatively straightforward – we need to choose between three alternatives:

  • If Farmer John drives directly from aa to bb without teleporting, he travels a distance of |a−b||a−b|.
  • Farmer John could travel from aa to xx, teleport to yy, then travel to bb, for a distance of |a−x|+|b−y||a−x|+|b−y|.
  • Farmer John could travel from aa to yy, teleport to xx, then travel to bb, for a distance of |a−y|+|b−x||a−y|+|b−x|.

Taking the smallest of these three yields the answer.

Thanks!