일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- C++
- centuryFromYear
- matrixElementsSum
- Python
- recursion
- almostIncreasingSequence
- 2750
- shapeArea
- Counting cells in a blob
- adjacentElementsProduct
- Sequential Search
- codesignal
- cpp
- 수 정렬하기
- flask
- 10953
- 파이썬머신러닝완벽가이드
- markdown
- 2015 봄학기 알고리즘
- 파이썬 포렌식
- baekjun
- All Longest Strings
- collections.deque
- Numpy
- data_structure
- til
- Daily Commit
- 피보나치 수
- codesingal
- 백준
- Today
- Total
목록codesignal 6
Introfor
After becoming famous, the CodeBots decided to move into a new building together. Each of the rooms has a different cost, and some of them are free, but there's a rumour that all the free rooms are haunted! Since the CodeBots are quite superstitious, they refuse to stay in any of the free rooms, or any of the rooms below any of the free rooms. Given matrix, a rectangular matrix of integers, wher..
Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array. Note: sequence a0, a1, ..., an is considered to be a strictly increasing if a0 < a1 < ... < an. Sequence containing only one element is also considered to be strictly increasing. 일련의 증가하는 시퀀스를 가지는가를 판별하는 문제다. 도저히 알고리즘이 생각나지 않아 타인..
Below we will define an n-interesting polygon. Your task is to find the area of a polygon for a given n. A 1-interesting polygon is just a square with a side of length 1. An n-interesting polygon is obtained by taking the n - 1-interesting polygon and appending 1-interesting polygons to its rim, side by side. You can see the 1-, 2-, 3- and 4-interesting polygons in the picture below. 그림에서 보면 알 수..
Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. 주어진 정수 배열에서, 곱이 가장 큰 인접한 요소쌍을 찾아서 곱의 값을 반환한다. def adjacentElementsProduct(inputArray): return max([inputArray[i] * inputArray[i + 1] for i in range(len(inputArray) - 1)]) 각각의 인접한 요소쌍의 곱의 값들을 리스트에 저장하고, max()를 통해 최댓값을 구하여 반환한다.
Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc. 주어진 년도로 세기를 반환하는 문제. 1세기는 1년~100년까지이고, 101년부터 200년까지 2세기를 뜻한다. def centuryFromYear(year): if(year%100==0): return year//100 else: return (year//100)+1 주어진 year가 100으로 나눴을 때 나누어 떨어지면 그 몫이 1세기를 반환하고, 나누어 떨어지지 않으면 ..