summaryrefslogtreecommitdiff
path: root/7b.py
diff options
context:
space:
mode:
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)