Buggy python submission (verdict: Runtime Error):
import  numpy as np

N,W = map(int, input().split())

INF = 1e100

dp = [INF] * (10 ** 5 + 1)
dp = np.array(dp)

dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w , dp[v:])


for v,num in enumerate(dp):
    if num <= W:
        ans = v

print(ans)

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Buggy python submission (verdict: Runtime Error):
import  numpy as np

N,W = map(int, input().split())

INF = 1e100

dp = [INF] * (10 ** 5 + 1)
dp = np.array(dp)

dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w , dp[v:])


for v,num in enumerate(dp):
    if num <= W:
        ans = v

print(ans)

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
 
N,W = map(int, input().split())
 
dp = [10 ** 10] * N * (10 ** 3)
dp[0] = 0
dp = np.array(dp)
 
 
for i in range(N):
    w,v = map(int, input().split())
    dp[v:] = np.minimum(dp[v:] , dp[:-v] + w)
    dp[:v] = np.minimum(dp[:v] , w)
  
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
 
N,W = map(int, input().split())
 
dp = np.zeros(W+1 , np.int64)
 
 
for i in range(N):
    w,v = map(int, input().split())
    dp[w:] = np.maximum(dp[w:] , dp[:-w] + v)
 
print(dp[-1])

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
 
N,W = map(int, input().split())
 
dp = np.zeros(W+1 , np.int64)
 
 
for i in range(N):
    w,v = map(int, input().split())
    dp[w:] = np.maximum(dp[w:] , dp[:-w] + v)
 
print(dp[-1])

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import numpy as np
 
N,W = map(int, input().split())
 
dp = np.zeros(W+1 , np.int64)
 
 
for i in range(N):
    w,v = map(int, input().split())
    dp[w:] = np.maximum(dp[w:] , dp[:-w] + v)
 
print(dp[-1])

Fixed submission:
import numpy as np
 
N, W = map(int, input().split())
WV = np.array([input().split() for _ in range(N)], np.int64)
V = sum(WV[:,1])
dp = np.zeros(V + 1, np.int64)
dp += 10 ** 10
dp[0] = 0
for w, v in WV:
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)
for v in range(V + 1):
    if dp[v] <= W:
        ans = v
print(ans)