Skip to content

Commit 5456dae

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4e53585 commit 5456dae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

solutions/general/usaco-807.mdx

+2-6
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,9 @@ int main() {
9393
* out whether it is the smallest and best case scenario for teleporting
9494
*/
9595
int dist = abs(a - b); // calculate the distance without travel
96-
if (dist > abs(a - c) + abs(b - d)) {
97-
dist = abs(a - c) + abs(b - d);
98-
}
96+
if (dist > abs(a - c) + abs(b - d)) { dist = abs(a - c) + abs(b - d); }
9997
// repeat this again with the other possiblity given below
100-
if (dist > abs(a - d) + abs(b - c)) {
101-
dist = abs(a - d) + abs(b - c);
102-
}
98+
if (dist > abs(a - d) + abs(b - c)) { dist = abs(a - d) + abs(b - c); }
10399

104100
cout << dist << endl;
105101
}

0 commit comments

Comments
 (0)