~athorp96/kattis-solutions

3126d67ebd829c75e7f9ae86aa8f28a5f22206c1 — Andrew Thorp 1 year, 5 months ago 71b2500 master
Clean up unused code
1 files changed, 0 insertions(+), 20 deletions(-)

M 10_kinds_of_people/10_kinds_of_people.py
M 10_kinds_of_people/10_kinds_of_people.py => 10_kinds_of_people/10_kinds_of_people.py +0 -20
@@ 2,13 2,6 @@ import sys
from queue import PriorityQueue
import math

debug = False

def log(msg):
    if debug:
        print(f"Debug:\t{msg}")
    return

def parse_query(input):
    parts = input.split()



@@ 63,8 56,6 @@ class Map:
            for j in range(self.n_cols):
                value = self.rows[i][j]

                # print(f"checking {i},{j}")

                # Check below
                if i < self.n_rows - 1:
                    if self.rows[i+1][j] == value:


@@ 90,7 81,6 @@ class Map:

        return parent


    def union(self, x1, y1, x2, y2):
        return self._union(self.key(x1, y1), self.key(x2, y2))



@@ 98,8 88,6 @@ class Map:
        root_1 = self._find(n1)
        root_2 = self._find(n2)

        # print(f"\tunion {n1} to {n2}")

        if root_1 == root_2:
            return



@@ 110,7 98,6 @@ class Map:
            self.parent[root_1] = root_2
            self.rank[root_2] = max(self.rank[root_1] + 1, self.rank[root_2])


def main():
    dimensions = sys.stdin.readline()



@@ 119,13 106,7 @@ def main():
    except Exception as e:
        print(f"error: {e}")

    # log(dimensions)

    map = Map(dimensions)
    # print(map.parent)
    # print(map.rank)
    # print(map.graph)
    # log(map.rows)

    num_queries = int(sys.stdin.readline().strip())



@@ 140,6 121,5 @@ def main():
        else:
            print("neither")


if __name__ == "__main__":
    main()