국밥 개발자

  • 홈
  • 태그
  • 방명록

Dynamic Programming 2

[DP(Dynamic Programming)] 백준-1915 가장 큰 정사각형 골드4(Python)

백준-1915 : 가장 큰 정사각형 https://www.acmicpc.net/problem/1915 1915번: 가장 큰 정사각형 첫째 줄에 n, m(1 ≤ n, m ≤ 1,000)이 주어진다. 다음 n개의 줄에는 m개의 숫자로 배열이 주어진다. www.acmicpc.net 풀의 1 되어있을 경우 좌, 우, 좌상 값중 가장 작은 값에 1을 더한 값으로 메트릭스 수정한다. 갱신 후 결과값보다 크면 결과 값을 갱신한다. 놓쳤던 부분 1행 1열 부터 확인하여 0행과, 0열에 1의 값이 있고 그외에 값이 0일때의 케이스를 놓쳤었음 코드 (Python) import sys def input(): return sys.stdin.readline().rstrip() n, m = map(int, input().spli..

Algorithm 2023.05.04

[DP(Dynamic Programming)] 백준-14767 Flow Shop(Python)

백준-14767 : Flow Shop https://www.acmicpc.net/problem/14767 14767번: Flow Shop There is only one test case in each file. It begins with a single line containing N and M (1 ≤ N, M ≤ 1000), the number of swathers and stages (respectively). Following this are N lines, each with M integers. The j’th integer of the i’th line is Pi www.acmicpc.net 문제 n개의 스웨터 주문과, m개의 공정을 과정을 입력 받는다. 각 공정마다 기계는 한개씩 존재하고 ..

Algorithm 2023.04.30
이전
1
다음
더보기
  • 분류 전체보기 (116)
    • DevOps (21)
    • MSA (27)
    • React (9)
    • Typescript (5)
    • FrontEnd (5)
    • Error (6)
    • NestJS (3)
    • Rust (1)
    • Algorithm (25)
    • AWS (2)
    • Git (10)
    • HTTP (2)
    • 개발 (0)

최근글과 인기글

  • 최근글
  • 인기글
Git Hub

Copyright © Kakao Corp. All rights reserved.

티스토리툴바