def main():
    h = CodeJamHelper("A-small-attempt0")    
    
    t = h.nextInt()

    for x in range(t):
        nt = h.nextLineOfInts()
        n = nt[0]
        t = nt[1]
        flows = h.nextDelimitedLine()
        flows = [[y == "1" for y in flow] for flow in flows ]
        devices = h.nextDelimitedLine()
        devices = [[y == "1" for y in device] for device in devices]
        h.output(process(flows, devices))
Esempio n. 2
0
def main():
    h = CodeJamHelper("A-large")    
    
    t = h.nextInt()

    for x in range(t):
        h.output(process(h.nextDelimitedLine("/")))
def main():
    h = CodeJamHelper("B-large-practice")    
    
    n = h.nextInt()

    for x in range(n):
        h.output(process(h.nextDelimitedLine()))