Read function
This commit is contained in:
parent
fef84875b3
commit
78022242e6
35
read.py
35
read.py
|
@ -1 +1,34 @@
|
|||
#
|
||||
#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(' ')
|
||||
|
||||
|
Reference in a new issue