로그 남기기

  • 홈
  • 태그

백준 7562 파이썬 1

[백준/BOJ] 7562 - 나이트의 이동

7562 - 나이트의 이동 문제 체스판 위에 한 나이트가 놓여져 있다. 나이트가 한 번에 이동할 수 있는 칸은 아래 그림에 나와있다. 나이트가 이동하려고 하는 칸이 주어진다. 나이트는 몇 번 움직이면 이 칸으로 이동할 수 있을까? 코드 from collections import deque def bfs(i, j, count): q = deque() q.append((i, j, count)) while q: x, y, cnt = q.popleft() if x == end_x and y == end_y: return cnt for i in range(8): nx, ny = x + dx[i], y + dy[i] if 0

Algorithm/📊 Problem Solving
1
더보기
프로필사진

  • 💻 Development (408)
    • Algorithm (200)
      • 📝 Concept (10)
      • 📊 Problem Solving (190)
    • Computer Science (17)
      • 🔒 Operating System (11)
      • 📡 Network (3)
      • 💾 Database (3)
    • Back-end (18)
      • ⌛ Intro (5)
      • 🔩 Server program (5)
      • 📗 Spring (5)
      • 📒 Node.js (3)
    • Language (9)
      • 📕 Java (8)
      • 📘 Python (1)
    • Infra (13)
      • ⛅ AWS (3)
      • 📺 Git (10)
    • Retrospect (119)
      • 🥇 Daily (111)
      • 🥈 Weekly (6)
      • 🥉 Montly (2)
    • Etc (32)
      • 📢 Talk (11)
      • 📃 Certification (21)

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

05-12 18:40

방문자수Total

  • Today :
  • Yesterday :
Github

Copyright © Kakao Corp. All rights reserved.

  • github

티스토리툴바