Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- DFS
- Apache Kafka
- Kafka
- springboot
- 인천여행
- 월미도
- 백준
- 프로그래밍문제
- 자료구조
- 알고리즘
- 스프링 부트
- Docker
- Elasticsearch
- JPA
- 코드업
- 로드밸런서
- Spring Data JPA
- Spring
- 스프링
- 클라우드
- 스프링부트
- Spring Boot
- 카프카
- 쿠버네티스
- 클라우드 컴퓨팅
- aws
- gcp
- 오일러프로젝트
- VPC
- 백트래킹
Archives
- Today
- Total
목록좌표압축 (1)
GW LABS
[Backjoon] 좌표 압축
정렬을 이용한 문제이다. 좌표들을 정렬하고 나서 원래 갖고 있던 인덱스를 통해 조건에 맞는 값을 출력하면 되는 문제였는데 set을 이용해서 자동으로 입력값들을 정렬하는 방식으로 접근했다. 다른 풀이법으로는 이진탐색을 이용해서 풀이하는 방법이 있었다. #include #include #include #include #include #include using namespace std; int main() { int count; cin >> count; set cord_set; int* cords = new int[count]; for (int idx = 0; idx < count; ++idx) { int tmp; scanf("%d", &tmp); cords[idx] = tmp; cord_set.insert(..
Algorithm & DataStructure/Problems
2021. 4. 24. 09:24