commit ed471b851356f54e99096d00683a0020c1cda1f3
parent 8e802778f9c3fa967f8521191498a59a41356808
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Wed, 20 May 2015 23:33:24 +0200
no more python script
Diffstat:
routes.py | | | 49 | ------------------------------------------------- |
1 file changed, 0 insertions(+), 49 deletions(-)
diff --git a/routes.py b/routes.py
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-E = {}
-
-best = 1
-
-for l in sys.stdin.readlines():
- v = l.split(',')
- f = v[2]
- t = v[4]
- if f not in E.keys():
- E[f] = set()
- E[f].add(t)
- # symmetrize
- if t not in E.keys():
- E[t] = set()
- E[t].add(f)
-
-print (len(E.keys()))
-l = sorted(list(E.keys()))
-rev = {}
-for i in range(len(l)):
- print (l[i])
- rev[l[i]] = i
-ne = sum(len(E[x]) for x in l)
-print (ne)
-for i in range(len(l)):
- for x in E[l[i]]:
- print("%d %d" % (i, rev[x]))
-
-#print ("airports: %d" % len(E.keys()))
-#
-#for a0 in E.keys():
-# q = [(a0, 0)]
-# seen = set()
-# while len(q) > 0:
-# a, d = q[0]
-# q = q[1:]
-# if a in seen:
-# continue
-# seen.add(a)
-# best = max(d, best)
-# if d == best:
-# print ("%d: %s -> %s" % (d, a0, a))
-# for b in E[a]:
-# q.append((b, d+1))
-#