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

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)
  • 방명록

3190 (1)
[백준] 3190 : 뱀 - Python

https://www.acmicpc.net/problem/3190 3190번: 뱀 문제 'Dummy' 라는 도스게임이 있다. 이 게임에는 뱀이 나와서 기어다니는데, 사과를 먹으면 뱀 길이가 늘어난다. 뱀이 이리저리 기어다니다가 벽 또는 자기자신의 몸과 부딪히면 게임이 끝난다. www.acmicpc.net import sys from collections import deque N = int(sys.stdin.readline()) s = [[0] * N for _ in range(N)] for _ in range(int(sys.stdin.readline())): r, c = map(int, sys.stdin.readline().split()) s[r-1][c-1] = 1 change = [] L = int..

Algorithm/Baekjoon 2020. 7. 3. 22:01
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
«   2026/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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바