
[프로그래머스] 고득점Kit 스택/큐 - 주식가격 #include #include using namespace std; vector solution(vector prices) { vector answer(prices.size() ,0); for(int i=0; i prices[j]) j = prices.size(); answer[i]++; } } return answer; } 왜 스택/큐 문제에 있는지 모르겠던 문제... 일단 설명이 아주 불친절하다. 문제 파악하는데 60% 스택/큐 문제에 있길래 스택으로 풀려고 시도한게 38% 문제푸는 시간 2% 였던 아주 괴상한 문제. 스택/큐 로 풀지 않으면 효율성에라서도 걸려야 하지 않나? 했던 문제다. (조건만 체크해주면 절..

[프로그래머스] 고득점 Kit 스택/큐 - 다리를 지나는 트럭 #include #include #include using namespace std; int solution(int bridge_length, int weight, vector truck_weights) { int answer = 0; queue m_QReadyTruck; queue m_QMovingTruck; int curWeight = 0; for (int i=0; i< truck_weights.size(); i++) { m_QReadyTruck.push(make_pair(truck_weights[i], 0)); } while (!m_QReadyTruck.empty() || !m_QMovingTruck.empty(..

[프로그래머스] 고득점Kit 스택/큐 - 프린터 #include #include #include using namespace std; bool checkPriority(queue _priority) { int frontCount = _priority.front().first; _priority.pop(); while(!_priority.empty()) { if(frontCount < _priority.front().first) return false; _priority.pop(); } return true; } int solution(vector priorities, int location) { int answer = 0; queue List; for(int i=0; i< pri..

[프로그래머스] 고득점Kit 스택/큐 - 올바른 괄호 #include #include #include using namespace std; bool solution(string s) { bool answer = true; stack bracket_string; for(int i=0; i< s.length(); i++) { bracket_string.push(s[i]); } int closeBracketCount =0; while(!bracket_string.empty()) { if(bracket_string.top() == ')') closeBracketCount++; else if(bracket_string.top() == '(') closeBracketCount--; if(c..

[프로그래머스] 고득점Kit 스택/큐 - 기능개발 #include #include #include using namespace std; vector solution(vector progresses, vector speeds) { vector answer; queue EndDate; for(int i=0; i< progresses.size(); i++) { int left_progress = 100 - progresses[i]; int left_date = left_progress / speeds[i]; if(left_progress % speeds[i] != 0) left_date++; EndDate.push(left_date); } int curDate = EndDate.fro..
- Total
- Today
- Yesterday
- 디자인 패턴
- UE5
- 개인공부
- 완전탐색
- Unreal 5.1
- BFS
- 누적합
- 고득점 Kit
- C++
- 탐욕법
- 채팅서버
- level3
- 스택/큐
- 데디케이티드
- 재귀
- 힙
- 고득점kit
- FPS
- LV2
- sort
- IMGUI
- LV3
- 정렬
- Ue
- 해시
- greedy
- DFS
- 너비우선탐색
- 프로그래머스
- Heap
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |