one Book a Day

  • 홈
  • 태그
  • 방명록
  • GitHub

1987 2

[백준][Python] 1987 알파뱃

상태공간 check에 같은 상태가 안오도록 가지치기. import sys input = sys.stdin.readline def bfs(x, y): q = set([(x, y, board[x][y])]) check[x][y] = board[x][y] answer = 1 while q: x, y, string = q.pop() for dx, dy in delta: nx, ny = x + dx, y + dy if 0

practivceAlgorithm/백준 2021.10.19

[백준][Python] 1987 알파뱃

완전탐색을 하며 탐색한 값을 배열에 넣어 중복된 값을 탐색하지 않도록 해 최고 값을 저장해주는 방식. import sys input = sys.stdin.readline # 좌, 하, 우, 상 dx = [-1, 0, 1, 0] dy = [0, -1, 0, 1] def BFS(x, y): global answer q = set([(x, y, board[x][y])]) while q: x, y, ans = q.pop() # 좌우상하 갈 수 있는지 살펴본다 for i in range(4): nx = x + dx[i] ny = y + dy[i] # index 벗어나지 않는지 체크하고, 새로운 칸이 중복되는 알파벳인지 체크한다 if ((0

practivceAlgorithm/백준 2021.08.10
1
더보기
프로필사진
  • 분류 전체보기 (720)
    • webDeveloper (11)
      • Browser (5)
      • Test (1)
    • frontend (50)
      • HTML (6)
      • CSS&Design (14)
      • JavaScript (16)
      • TypeScript (2)
      • React (8)
      • 상태관리 (2)
      • d3.js & three.js (1)
    • backend (21)
      • Node.js (0)
      • Django&Python (15)
      • Java (2)
      • Spring Boot (0)
      • DB (4)
    • practivceAlgorithm (570)
      • 자료구조&알고리즘 (29)
      • PYTHON 기능연습 (11)
      • 백준 (379)
      • swexpertacademy (84)
      • programmers (23)
      • codeforce (20)
      • LeetCode (0)
      • 다시 봐야할 문제들 (22)
    • Computer Science (37)
      • 소프트웨어 공학 (9)
      • 네트워크 (10)
      • 운영체제 (7)
      • 컴퓨터 구조 (4)
      • DB (2)
      • 모델링 & 아키텍쳐 & 패턴 (3)
      • IOT (2)
    • GitHub&Git (7)
    • 후기 (3)
    • IDE (1)
    • Memo (1)

Tag

TRIE, 슬라이딩 윈도우, 2018, codeforce 702, React, dfs, JS 30, 백준, kakao 2018, 비트마스크, 비트마스킹, 분할정복, DP, Python, JS, BOJ, http, 다익스트라, kakao 2019, 파이썬,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Archives

Calendar

«   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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바