Merge branch 'master' of github.com:GeoffreyFrogeye/hashcode2016

This commit is contained in:
JLo'w 2016-02-11 19:24:41 +01:00
commit 05581c0c4a

36
main.py
View file

@ -1,3 +1,39 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import math
print("#hashcode2016") print("#hashcode2016")
X = 0 # Nb rows
Y = 0 # Nb columns
D = 0 # Nb drones
T = 0 # Deadline
M = 0 # Maximum load
P = 0 # Nb products
W = 0 # Nb warehouses
C = 0 # Nb customers
Dp = []; # Positions of drones
# (x, y)
Di = []; # Items of drones
# {product number: qt}
Dd = []; # Turn avaibility of drone
# int
Pw = []; # Weight of products
# int
Wp = []; # Positions of warehouses
# (x, y)
Wi = []; # Items of warehouses
# {product number: qt}
Cp = []; # Positions of customers
# (x, y)
Ci = []; # Needs of customers
# {product number: qt}
def distance(A, B):
return math.ceil(sqrt(pow((B[0] - A[0], 2) + pow(B[1] - A[1], 2))))