본문 바로가기 메뉴 바로가기

Ryulurala's notepad

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Ryulurala's notepad

검색하기 폼
  • total (352)
    • SSU Open World (1)
    • Reference (12)
      • C++ (7)
      • JavaScript (5)
    • Programmers Solutions (211)
      • previous (69)
      • Level-1 (47)
      • Level-2 (56)
      • Level-3 (39)
    • Baekjoon Solutions (122)
      • Class-1 (34)
      • Class-2 (41)
      • Class-3 (34)
      • Class-4 (10)
      • Class-5 (1)
      • Class-6 (1)
    • Design (1)
      • Background (1)
    • Study (5)
      • Blender (Soongsil Univ.) (5)
  • 방명록

두개뽑아서더하기 (1)
[프로그래머스, C++] 두 개 뽑아서 더하기

문제 링크 코딩테스트 연습 - 두 개 뽑아서 더하기 programmers.co.kr 풀이 다양한 답이 있겠지만 중복 제거+오름차순해주는 것은 map이 너무 편하기 때문에 사용했다. 모든 조합에 대해서 map에 push해주고 다시 map을 순회하면서 answer에 push해준다. 더보기 #include #include #include using namespace std; vector solution(vector numbers) { vector answer; map m; // 중복 제거 + 오름차순 정렬용 for(int i=0; i

Programmers Solutions/previous 2020. 10. 5. 01:54
이전 1 다음
이전 다음
05-17 15:46
링크
  • GitHub
  • Youtube
TAG
  • 멀티미디어동아리
  • 2018 카카오 블라인드 채용
  • JS
  • 블랜더스터디
  • sort
  • C++
  • 코테
  • 큐
  • priority_queue
  • 코딩테스트
  • 백준
  • map
  • BFS
  • 프로그래머스
  • greedy
  • 탐욕법
  • Queue
  • Set
  • blender
  • hash
  • summerwintercoding2018
  • JavaScript
  • programmers
  • 해시
  • 2019 카카오 블라인드 채용
  • 카카오
  • DFS
  • string
  • 카카오 코테
  • 2020 카카오 블라인드 채용
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바