Fixed spliting at spaces issue
This commit is contained in:
@@ -48,7 +48,7 @@ def construct(sections: list[int], target: int) -> dict[int, int]:
|
||||
# All modules for CS 412 must include a main method that allows it
|
||||
# to imported and invoked from other python scripts
|
||||
def main():
|
||||
sections: list[int] = list(map(int, input().split(" ")))
|
||||
sections: list[int] = list(map(int, input().split()))
|
||||
target: int = int(input())
|
||||
|
||||
best_sections = construct(sections, target)
|
||||
|
||||
@@ -11,7 +11,7 @@ import sys
|
||||
# All modules for CS 412 must include a main method that allows it
|
||||
# to imported and invoked from other python scripts
|
||||
def main():
|
||||
sounds: list[str] = sys.stdin.readline().strip().split(" ")
|
||||
sounds: list[str] = sys.stdin.readline().strip().split()
|
||||
num_animals: int = int(sys.stdin.readline().strip())
|
||||
|
||||
animal_map: dict[str, str] = {}
|
||||
|
||||
@@ -12,18 +12,17 @@ import sys
|
||||
# to imported and invoked from other python scripts
|
||||
def main():
|
||||
|
||||
sounds: list[str] = sys.stdin.readline().strip().split(" ")
|
||||
sounds: list[str] = sys.stdin.readline().strip().split()
|
||||
num_animals: int = int(sys.stdin.readline().strip())
|
||||
|
||||
fox_sounds: list[str] = []
|
||||
animals_ecountered: list[str] = []
|
||||
|
||||
animal_sounds: list[tuple[str, str]] = list(
|
||||
map(
|
||||
lambda line: line.strip().split(" goes "),
|
||||
sys.stdin.readlines()[:num_animals],
|
||||
)
|
||||
)
|
||||
animal_sounds: list[tuple[str, str]] = []
|
||||
|
||||
for line in sys.stdin.readlines()[:num_animals]:
|
||||
split_line = line.strip().split(" goes ")
|
||||
animal_sounds.append((split_line[0], split_line[1]))
|
||||
|
||||
for sound in sounds:
|
||||
animal_found = False
|
||||
|
||||
@@ -15,7 +15,7 @@ def tile(grid: np.ndarray, hole: tuple[int, int]) -> None:
|
||||
|
||||
tile_index = 0
|
||||
grid[hole] = -1
|
||||
|
||||
|
||||
def recurse(size: int, top: int, left: int, hole: tuple[int, int]) -> None:
|
||||
if size == 1:
|
||||
return
|
||||
@@ -59,7 +59,7 @@ def tile(grid: np.ndarray, hole: tuple[int, int]) -> None:
|
||||
# to imported and invoked from other python scripts
|
||||
def main():
|
||||
n: int = int(input())
|
||||
x, y = map(int, input().split(" "))
|
||||
x, y = map(int, input().split())
|
||||
|
||||
grid: np.ndarray = np.zeros((2**n, 2**n), dtype=int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user