diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -7,7 +7,7 @@
     for w in range(W):
         for i in range(h + 1, H):
             for j in range(w + 1, W):
-                if A[h][w] + A[i][j] < A[i][w] + A[h][j]:
+                if A[h][w] + A[i][j] > A[i][w] + A[h][j]:
                     flag = False
 
 if flag:
