class Solution { public String solution(String[] participant, String[] completion) { String answer = ""; java.util.Map participantMap = new java.util.HashMap(); for (String name : participant) { if (participantMap.containsKey(name)) { Integer count = participantMap.get(name); participantMap.replace(name, ++count); } else { participantMap.put(name, 1); } } for (String name : completion) { if (par..
핵심 비내림차 순이라는 것은 이전값 보다 크면 안된다는 얘기 구현 // 2020-06-23 wsshin #include #include #include #include #include using namespace std; void DFS(int n, int m, int nCur); vector vecOutPutData; vector vecVisited; int main() { int n, m; cin >> n >> m; for (int i = 0; i = m) { for (int i = 0; i < vecOut..
핵심 DFS : 재귀로 구현가능하다. 백트레킹 : 이전 단계로 한단계 후퇴하면서 경우의 수를 확인하는 것 중요점은 가지치기(필요없는 경우는 거르는 것)을 통해야한다. *알게된 점 : cout n >> m; m_OutSize = m; m_NumSize = n; int CurSize = 0; for (int i = 0; i < m_NumSize; i++) { m_vecVisited.push_back(0); } CurSize = DFS(0); return 0; } int DFS(int CurSize) { if (CurSize == m_OutSize) { for (int i = 0; i < m_vecResult.size(); i++) { cout
핵심 출발점이 여러개가 될 수 있다면 BFS 시작전 출발점을 모두 큐에 넣어주고 시작하면 된다. 풀이 // 2020-05-22 wsshin #include #include #include #include #include using namespace std; int Solution(int SizeY, int SizeX, vector vecBoard); int main() { int SizeY = 0; int SizeX = 0; cin >> SizeX >> SizeY; vector vecBoard; for (int i = 0; i > nInput; nTemp..
핵심 입력 받은 2차원 배열(or백터)과 같은 사이즈로 출발점을 기준으로 각 칸으로 이동하는데 소요되는 Cost를 저장할 2차원 배열(or백터)를 하나 더 만든다 풀이 // 2020-05-21 wsshin #include #include #include #include #include #include using namespace std; int Solution(int SizeY, int SizeX, vector vecBoard); int main() { int SizeY = 0; int SizeX = 0; cin >> SizeY >> SizeX; vector vecBoard; for (int i = 0; i > strTemp; vecBoa..
- Total
- Today
- Yesterday
- C
- 람다함수
- c++
- c++11
- Lambda
- bug
- UE5
- 람다
- Trouble shooting
- rotator
- UE4
- double free
- unrealengine
- coordinate system
- LambdaFunction
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |