summaryrefslogtreecommitdiff
path: root/7b.py
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-12-02 09:30:07 +0100
committertomsmeding <tom.smeding@gmail.com>2017-12-02 09:30:07 +0100
commit2c1dccf57d7ad5e25e79063dea41fd7bfa9d9ac6 (patch)
tree6c36355ef1a475f2b7cf388402afc96a16588d3d /7b.py
parent2d02f553aa4cc4ded630628eccdf34f55937cee5 (diff)
Move 2016 to its own folder
Diffstat (limited to '7b.py')
-rwxr-xr-x7b.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/7b.py b/7b.py
deleted file mode 100755
index ea31643..0000000
--- a/7b.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-
-count=0
-
-for line in sys.stdin:
- line=line[:-1].replace("]","[").split("[")
- p1=line[0::2]
- p2=line[1::2]
- p2bab=set()
-
- for bl in p2:
- for i in range(len(bl)-2):
- if bl[i]==bl[i+2] and bl[i]!=bl[i+1]:
- p2bab.add(bl[i:i+3])
-
- for bl, i in ((bl,i) for bl in p1 for i in range(len(bl)-2)):
- if bl[i]==bl[i+2] and bl[i]!=bl[i+1] and "".join([bl[i+1],bl[i],bl[i+1]]) in p2bab:
- count+=1
- break
-
-print(count)