Graph Statistic by lynn

S=sorted
while 1:
 s=raw_input();d={c:{c}for c in s}
 for x,_,y in s.split():
\x09u=d[x]|d[y]
\x09for c in u:d[c]=u
 u=S([''.join(S(d[k]))for k in d],key=len);print u[2],u[-1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page