🐍Python

    [알고리즘] 16. Birthday Chocolate

    Lily has a chocolate bar that she wants to share it with Ron for his birthday. Each of the squares has an integer on it. She decides to share a contiguous segment of the bar selected such that the length of the segment matches Ron's birth month and the sum of the integers on the squares is equal to his birth day. You must determine how many ways she can divide the chocolate.Consider the chocolat..

    [OpenCV] 05-1. Understanding Features

    이번 장에서는, 특성이 무엇인지, 왜 중요한지, 왜 모서리가 중요한지에 대해서 이해해 볼 것이다.Explanation퍼즐 게임을 해본 적이 있을 것이다. 이미지의 작은 조각들을 가지고 전체의 큰 이미지의 형태로 정확하게 맞춰야한다. 어떻게 할 수 있느냐가 질문이다! 같은 이론을 컴퓨터 프로그램에 투영시켜서 컴퓨터가 퍼즐을 플레이하게 할 수 있겠는가? 만약 컴퓨터가 퍼즐을 할 수 있다면, 왜 컴퓨터에게 자연의 일부 풍경을 주고 하나의 단일 이미지로 맞추라고 할 수 없을까? 만약 컴퓨터가 자연적인 이미지를 여러장 맞출 수 있다면, 건물이나 어떠한 구조물의 사진을 대량 주고 그 안에서 3D 모델을 만들라고 하는 것을 어떨까?답은, 우리는 쉽게 비교될 수 있는, 독..

    [알고리즘] 15. Breaking the Records

    Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game establish her record for the season, and she begins counting from there.For example, assume her scores for the season are represented in the array . Scores are..

    [알고리즘] 14. Between Two Sets

    You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions:The elements of the first array are all factors of the integer being consideredThe integer being considered is a factor of all elements of the second arrayThese numbers are referred to as being between the two arrays. You must determine how many such numbers exist.For example, g..

    [알고리즘] 13. Kangaroo

    You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity).The first kangaroo starts at location and moves at a rate of meters per jump.The second kangaroo starts at location and moves at a rate of meters per jump.You have to figure out a way to get both kangaroos at ..

    [알고리즘] 12. Apple and Orange

    Sam's house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where is the start point, and is the endpoint. The apple tree is to the left of his house, and the orange tree is to its right. You can assume the trees are located on a single point, where the apple tree is at point , and the orange tree is at point .When a ..