본문 바로가기 메뉴 바로가기

이것저것 기록 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

이것저것 기록 블로그

검색하기 폼
  • 분류 전체보기 (206)
    • 이것저것 자료 (72)
      • Python (24)
      • Linux (13)
      • Vim (2)
      • Docker (12)
      • C++ (3)
      • Git (1)
      • Shell script (4)
      • 그 외 (13)
    • 공부 (4)
      • Paper (1)
      • Algorithm (0)
      • Architecture&OS (0)
      • 용어 및 개념 (3)
      • 네트워크 (0)
      • 데이터베이스 (0)
      • 자료구조 (0)
      • Spring boot (0)
      • 디자인패턴 (0)
      • Kotlin (0)
    • 일상 (0)
    • 맞춤법 (0)
    • 코딩테스트 대비 (127)
  • 방명록

연구소 (1)
[백준] 14502번 연구소

from collections import deque from itertools import combinations import copy n, m = map(int, input().split()) graph = [] two = [] answer = 0 for _ in range(n): graph.append(list(map(int, input().split()))) dx = [-1, 1, 0, 0] dy = [0, 0, -1, 1] def bfs(): two = deque() graph_ = copy.deepcopy(graph) for i in range(n): for j in range(m): if graph_[i][j] == 2: two.append([i,j]) while two: y, x = two..

코딩테스트 대비 2022. 3. 18. 03:10
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • docker
  • shellscript
  • BFS
  • dfs
  • numpy
  • 설치하기
  • 이것이코딩테스트다
  • error
  • 최소신장트리
  • pytorch
  • 카카오
  • tensorflow
  • n과m
  • 설치
  • matplotlib
  • Python
  • LGSVL
  • CUDA
  • 백트래킹
  • version
  • 프로그래머스
  • 파이썬
  • notfound
  • 코딩테스트
  • 동적프로그래밍
  • torchscript
  • 다익스트라
  • torch
  • 백준
  • PIP
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바