55491 백준(BOJ) 5549 행성 탐사(Python) 누적 합 문제. 2차원 누적 합을 정글, 바다, 얼음에 대해 각각 만들고 값을 출력하면 된다. 계산하기 쉽도록 0으로 이루어진 행과 열을 각각 0번째로 두고 풀었다. 코드는 다음과 같다. # -*- coding: utf-8 -*- import sys from collections import deque import heapq import bisect import math from itertools import product from itertools import combinations """ from itertools import combinations from itertools import combinations_with_replacement from itertools import permutation.. 2023. 4. 20. 이전 1 다음