This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
hashcode2016/read.py

54 lines
979 B
Python
Raw Normal View History

2016-02-11 19:24:11 +01:00
#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(' ')
2016-02-11 19:36:20 +01:00
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
2016-02-11 19:24:11 +01:00
2016-02-11 19:36:20 +01:00
return