본문 바로가기
728x90
반응형

Algorithm25

자료구조와 알고리즘 자료구조란? 프로그램이란 데이터를 표현 알고리즘이란? 표현된 데이터를 처리 알고리즘을 평가하는 두 가지 요소 - 시간 복잡도 - 공간 복잡도 시간 복잡도의 평가 방법 - 중심이 되는 특정 연산의 횟수를 세어서 평가를 한다. - 데이터의 수에 대한 연산횟수의 함수 T(n)을 구한다. O(1) - 상수 시간 알고리즘이 문제를 해결하는데 오직 한 단계만 거친다. O(log n) - 로그 시간 문제를 해결하는데 필요한 단계들이 연산마다 특정 요인에 의해 줄어든다. O(n) - 직선적 시간 문제를 해결하기 위한 단계의 수와 입력값 n이 1:1 관계를 가진다. O(n^2) - 2차 시간 문제를 해결하기 위한 단계의 수는 입력값 n의 제곱이다. O(C^n) - 지수 시간 문제를 해결하기 위한 단계의 수는 주어진 상수.. 2019. 4. 18.
알고리즘 코드는 깃에.... https://github.com/ku-alps/sw15_jinyoung 2019. 4. 1.
cordforces - A. Next Round "Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant earns a positive score..." — an excerpt from contest rules. A total of n participants took part in the contest (n ≥ k), and you already know their scores. Calculate how many participants will advance to the next round. Input The first line of the input .. 2018. 1. 24.
cordforces - A. Theatre Square Theatre Square in the capital city of Berland has a rectangular shape with the size n × mmeters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size a × a. What is the least number of flagstones needed to pave the Square? It's allowed to cover the surface larger than the Theatre Square, but the Square ha.. 2018. 1. 24.
728x90
반응형