diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,7 +1,7 @@
 N, M = map(int, input().split())
 A = list(map(int, input().split()))
 
-dp = [[0] * N for i in range(M)]
+dp = [[-(10**18)] * N for i in range(M)]
 dp[0][0] = A[0]
 for i in range(1, N):
     dp[0][i] = max(A[i], dp[0][i - 1])
