프로그래머스 : 카카오_크레인 인형 뽑기 게임(C++)_Stack
풀이 #include #include #include #include #include #include #include using namespace std; int solution(vector board, vector moves) { int answer = 0; stack stack; for (int move : moves) { for (int i = 0; i < board[move - 1].size(); i++) { if (board[i][move - 1] != 0) { if (stack.empty()) { stack.push(board[i][move - 1]); } else { if (stack.top() == board[i][move - 1]) { stack.pop(); answer+=2; } els..
Algoritem/Problem solving
2020. 5. 20. 14:19
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- C
- double free
- UE5
- unrealengine
- 람다
- coordinate system
- Trouble shooting
- c++11
- c++
- LambdaFunction
- 람다함수
- UE4
- bug
- Lambda
- rotator
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
글 보관함