def read_sequence(i):
“””This helper function reads i lines as i products or boxes
They are returned as a list of tuples like [(“p1”, 2, 4), (“p2”, 5, 3), …]
(You may replace this representation with something else if you want.)
Copyright By PowCoder代写 加微信 powcoder
sequence = []
for _ in range(i):
name, x, y = input().split()
sequence.append((name, int(x), int(y)))
return sequence
# read the two solved “total fit”
FL = int(input())
FR = int(input())
# read the next three lines
n = int(input()) # note that n=m
n_pl = int(input())
n_bl = int(input())
# read the remaining lines and make the four lists
PL = read_sequence(n_pl)
BL = read_sequence(n_bl)
PR = read_sequence(n-n_pl)
BR = read_sequence(n-n_bl)
#################################
# implement your algorithm here #
#################################
# print out the combined total fit
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com