54 lines
979 B
Python
54 lines
979 B
Python
#Read the input file
|
|
|
|
import sys.io
|
|
|
|
def Read_input_file(file):
|
|
f = open(file, 'r')
|
|
|
|
line = readline()
|
|
info = line.split(' ')
|
|
|
|
GRILLE = (int(info[0]), int(info[1]))
|
|
D = int(info[2])
|
|
T = int(info[3])
|
|
M = int(info[4])
|
|
|
|
line = readline()
|
|
P = int(line)
|
|
|
|
line = readline()
|
|
info = line.split(' ')
|
|
for (i in range(0, P)):
|
|
Pw[i] = int(info[i])
|
|
|
|
line = readline()
|
|
W = int(line)
|
|
|
|
for (i in range(0, W)):
|
|
line = readline()
|
|
info = line.split(' ')
|
|
Wp[i] = (int(info[0]), int(info[1]))
|
|
line = readline()
|
|
info = line.split(' ')
|
|
productQ = {}
|
|
for (j in range(1, info.size()+1):
|
|
productQ[j] = int(info[j])
|
|
Wi[i] = productsQ
|
|
|
|
line = readline()
|
|
nbC = int(line)
|
|
|
|
for(i in range(0, nbC)):
|
|
line = readline()
|
|
info = line.split(' ')
|
|
Cp[i] = (int(info[0]), int(info[1]))
|
|
line = readline()
|
|
nbP = int(line)
|
|
line = readline()
|
|
info = line.split(' ')
|
|
orderQ = {}
|
|
for (j in range(0, nbP)):
|
|
orderQ[j] = int(info[j])
|
|
Ci[i] = orderQ
|
|
|
|
return |