My issue
import heapq
import sys
infinity = sys.maxsize
def branch_and_bound(n, wmax, items):
# Write the code here
if name == “main”:
n, wmax = map(int, input().split())
items = [tuple(map(int, input().split())) for _ in range(n)]
print(branch_and_bound(n, wmax, items))
My code
import heapq
import sys
infinity = sys.maxsize
def branch_and_bound(n, wmax, items):
# Write the code here
if _name_ == "_main_":
n, wmax = map(int, input().split())
items = [tuple(map(int, input().split())) for _ in range(n)]
print(branch_and_bound(n, wmax, items))
Learning course: Design and Analysis of Algorithms
Problem Link: https://www.codechef.com/learn/course/kl-daa/KLDAA2428/problems/DAA174