<s> import os , sys <EOL> import operator <EOL> sys . path . append ( os . path . join ( os . getcwd ( ) , os . path . pardir ) ) <EOL> from graphs . graph import graph <EOL> from itertools import * <EOL> from union_find . unionfind import UnionFind <EOL> def ham_dist ( e1 , e2 ) : <EOL> """<STR_LIT>""" <EOL> ne = operator . ne <EOL> return sum ( imap ( ne , e1 , e2 ) ) <EOL> path = "<STR_LIT>" <EOL> nodes = open ( path ) . readlines ( ) <EOL> uf = UnionFind ( ) <EOL> for i in range ( len ( nodes ) ) : <EOL> for j in range ( i + <NUM_LIT:1> , len ( nodes ) ) : <EOL> print i , j , ham_dist ( nodes [ i ] , nodes [ j ] ) </s>
