๋ฌธ์ https://www.acmicpc.net/problem/14888 ์ฝ๋n = int(input())num = list(map(int, input().split()))operation = list(map(int, input().split())) # +, -, *, /maxi = -1e9mini = 1e9def dfs(idx, result, plus, minus, multiply, divide): global maxi, mini if idx == n: maxi = max(result, maxi) mini = min(result, mini) return if plus > 0: dfs(idx + 1, result + num[idx], pl..
ํ์ด์ฌ
๋ฌธ์ https://www.acmicpc.net/problem/1012 ์ฝ๋from collections import dequeT = int(input())for _ in range(T): n, m, k = map(int, input().split()) # ๊ฐ๋ก, ์ธ๋ก, ๋ฐฐ์ถ๊ฐ์ field = [[0 for _ in range(n)] for _ in range(m)] visit = [[False for _ in range(n)] for _ in range(m)] answer = 0 # ๋ฐฐ์ถ ์ง๋ ๊ทธ๋ฆฌ๊ธฐ for l in range(k): x, y = map(int, input().split()) field[y][x] = 1 for i in..