본문 바로가기

황소개발자

검색하기
황소개발자
프로필사진 hjp845

  • 분류 전체보기 (181)
    • 백준 문제 풀이 (154)
    • 투자자의 생각 (5)
    • 각종 에러 잡기 (10)
    • 앱개발 (8)
    • 매일 11시 영어 (0)
    • 유유자적하게 글쓰기 (0)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
  • 실전언어 연구소
«   2025/07   »
일 월 화 수 목 금 토
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
Tags
  • LCS
  • 9095
  • permutation
  • itertools
  • 11053
  • 1260
  • 11054
  • 안드로이드
  • 백준
  • Kotlin
  • 뒤로가기
  • lcm
  • 11기
  • 매일11시
  • 6603
  • expo
  • 1182
  • 최소공배수
  • Python
  • 코테
  • 괄호
  • 파이썬
  • 홈화면
  • 11057
  • 앱
  • Combination
  • Android
  • 나머지
  • 순열
  • 코틀린
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록7576 (1)

황소개발자

백준 7576 파이썬 python : 토마토 @@황소처럼 우직하게@@ 시간초과 해결

리스트에서 pop할 때, 시간복잡도는 O(n) 이다. 그러나 콜렉션에 디큐에서 pop의 시간복잡도는 O(1) 로 구현되어있다. import sys from collections import deque input = sys.stdin.readline dx = [1, -1, 0, 0] dy = [0, 0, 1, -1] w, h = map(int, input().split()) mat = [] for i in range(h): mat.append(list(map(int, input().split()))) q = deque() for i in range(h): for j in range(w): if mat[i][j] == 1: q.append([i, j]) def bfs(): global q while q: n..

백준 문제 풀이 2020. 3. 3. 02:41
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바