OSDN Git Service

凸包:fix typo
authorSshwy <hwy1272918035@outlook.com>
Wed, 2 Oct 2019 03:20:29 +0000 (11:20 +0800)
committerGitHub <noreply@github.com>
Wed, 2 Oct 2019 03:20:29 +0000 (11:20 +0800)
docs/geometry/convex-hull.md

index a21fde1..f843d41 100644 (file)
@@ -45,7 +45,7 @@ stk[++tp] =
     1;  //栈内添加第一个元素,且不更新used,使得1在最后封闭凸包时也对单调栈更新
 for (int i = 2; i <= n; ++i) {
   while (tp >= 2 && (p[stk[tp]] - p[stk[tp - 1]]) * (p[i] - p[stk[tp]]) <=
-                        1)  //此处*被重载为叉积
+                        0)  //此处*被重载为叉积
     used[stk[tp--]] = 0;
   used[i] = 1;  // used表示在凸壳上
   stk[++tp] = i;