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

Devlog

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

Devlog

검색하기 폼
  • 분류 전체보기 (171)
    • Record (1)
    • Algorithm (149)
      • Baekjoon (75)
      • Programmers (72)
      • Algorithm (2)
    • CS (9)
      • Data Structure (4)
      • Computer Structure (1)
      • etc. (4)
    • JavaScript (1)
    • Web (5)
    • Troubleshooting (3)
    • C, C++ (3)
  • 방명록

10026 (1)
[백준] 10026 : 적록색약 - Python

https://www.acmicpc.net/problem/10026 10026번: 적록색약 문제 적록색약은 빨간색과 초록색의 차이를 거의 느끼지 못한다. 따라서, 적록색약인 사람이 보는 그림은 아닌 사람이 보는 그림과는 좀 다를 수 있다. 크기가 N×N인 그리드의 각 칸에 R(빨강), G( www.acmicpc.net from collections import deque # 상, 하, 좌, 우 dx, dy = [-1, 1, 0, 0], [0, 0, -1, 1] def bfs(x, y): q.append([x, y]) check[x][y] = 1 while(q): x, y = q.popleft() for i in range(4): nx, ny = x + dx[i], y + dy[i] if 0

Algorithm/Baekjoon 2020. 7. 10. 01:27
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
«   2026/04   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바