Skip to content

Commit 451a8fc

Browse files
authored
Merge pull request #4196 from cpinitiative/IDON-TEXIST-patch-1
fix typo
2 parents fbaa886 + 5456dae commit 451a8fc

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)