From 78022242e604cc7a69b6e9f3130eb1a2924cc9fe Mon Sep 17 00:00:00 2001 From: JLo'w Date: Thu, 11 Feb 2016 19:24:11 +0100 Subject: [PATCH] Read function --- read.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/read.py b/read.py index 4287ca8..f32fba4 100644 --- a/read.py +++ b/read.py @@ -1 +1,34 @@ -# \ No newline at end of file +#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(' ') + + \ No newline at end of file