시나위

  • 홈
  • 태그
  • 방명록

촌수계산 1

[백준] 2644 촌수계산 python

www.acmicpc.net/problem/2644 2644번: 촌수계산 사람들은 1, 2, 3, …, n (1≤n≤100)의 연속된 번호로 각각 표시된다. 입력 파일의 첫째 줄에는 전체 사람의 수 n이 주어지고, 둘째 줄에는 촌수를 계산해야 하는 서로 다른 두 사람의 번호가 주어진 www.acmicpc.net import sys input = sys.stdin.readline from collections import deque N = int(input()) s, e = map(int, input().split()) link_arr = [list() for _ in range(N + 1)] M = int(input()) for _ in range(M): n1, n2 = map(int, input().s..

STUDY/Algorithm 2021.04.29
이전
1
다음
더보기
프로필사진

하고 싶은 거 다하고 정리하는 블로그

  • 분류 전체보기 (669)
    • STUDY (529)
      • Algorithm (402)
      • C, C++ (7)
      • Python (33)
      • Rust (28)
      • Swift & iOS (16)
      • Web (10)
      • Raspberry Pi (10)
      • Others (23)
    • OTHERS (140)
      • 내 생각 (134)
      • 리뷰 (5)

Tag

시뮬레이션, C++, 파이썬, 혼공단, 백트래킹, BFS, 그래프탐색, BOJ, 브루트포스, python, dfs, python3, 혼공파, 구현, C, dp, 백준, baekjoon, 프로그래머스, 다익스트라,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

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.

티스토리툴바