diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -26,7 +26,7 @@
                 dic2[a] = 1
         ans[i][j + 1] = len(dic2)
     if i < H - h:
-        for k in range(1, w):
+        for k in range(w):
             a = A[i + h][k]
             dic[a] -= 1
             if dic[a] == 0:
