일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 투 포인터
- 누적 합
- 유니티
- BFS
- 우선순위 큐
- 재귀
- 정렬
- 백트래킹
- Unreal Engine 5
- 그리디 알고리즘
- 알고리즘
- 유니온 파인드
- ue5
- DFS
- Team Fortress 2
- 그래프
- c++
- 다이나믹 프로그래밍
- 백준
- 스택
- 자료구조
- 문자열
- 다익스트라
- VR
- 수학
- XR Interaction Toolkit
- 구현
- 트리
- 브루트포스
- 시뮬레이션
- Today
- Total
목록스택 (14)
1일1알
https://www.acmicpc.net/problem/17413 17413번: 단어 뒤집기 2 문자열 S가 주어졌을 때, 이 문자열에서 단어만 뒤집으려고 한다. 먼저, 문자열 S는 아래와과 같은 규칙을 지킨다. 알파벳 소문자('a'-'z'), 숫자('0'-'9'), 공백(' '), 특수 문자('')로만 이루어져 www.acmicpc.net 스택을 사용해서 풀었다. ''가 나올때까지 나오는 문자는 바로 출력 '>'를 만날경우 다음 문자부터는 바로 출력하지 않고 스택에 삽입 ' ' 를 만날경우 안에 있으면 넘어가고, 밖에 있으면 스택을 비운다 #include #include #include #include #include #include #include #include #include #include #..
https://www.acmicpc.net/problem/1935 1935번: 후위 표기식2 첫째 줄에 피연산자의 개수(1 ≤ N ≤ 26) 가 주어진다. 그리고 둘째 줄에는 후위 표기식이 주어진다. (여기서 피연산자는 A~Z의 영대문자이며, A부터 순서대로 N개의 영대문자만이 사용되며, 길이 www.acmicpc.net 스택 사용, float가 아닌 double 사용해야 함. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long l..
https://www.acmicpc.net/problem/17952 17952번: 과제는 끝나지 않아! 성애는 이번 학기에 전공을 정말 많이 듣는다. 이로 인해 거의 매일을 과제를 하면서 보내고 있다. 그런데도 과제가 줄어들 기미가 보이지 않는데, 바로 분단위로 과제가 추가되고 있기 때문이 www.acmicpc.net 최근에 했던 과제를 꺼내서 하기에는 스택이 적합한 것 같아서 스택을 사용해서 풀었다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ..
https://www.acmicpc.net/problem/12789 12789번: 도키도키 간식드리미 인하대학교 학생회에서는 중간, 기말고사 때마다 시험 공부에 지친 학우들을 위해 간식을 나눠주는 간식 드리미 행사를 실시한다. 승환이는 시험 기간이 될 때마다 간식을 받을 생각에 두근두 www.acmicpc.net 처음 줄을 큐로, 다른 대기하는 공간을 스택으로 해서 풀었다. 반복문 안의 if문들 1. 스택, 큐 둘다 비어있으면 다 간식을 받았기 때문에 반복 종료 2. 큐의 맨 앞이 현재 번호와 같다면 간식을 받도록 하고 번호 1 증가 3. 스택의 맨 위가 현재 번호와 같다면 간식을 받도록 하고 번호 1 증가 4. 큐의 맨 앞이 현재 번호와 같지 않다면 맨 앞 번호를 스택으로 옮김 5. 스택의 맨 앞이 현..
https://www.acmicpc.net/problem/17178 17178번: 줄서기 아이즈원의 팬인 시온이는 드디어 티켓팅에 성공하여 콘서트를 갔다. 콘서트장에 일찍 도착한 시온이는 기대하며 입장을 위해 줄을 섰다. 하지만 아이즈원의 인기대로 시온이를 포함한 많은 www.acmicpc.net 스택, 시뮬레이션 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; int n; struct ticketInfo { char..

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; enum { OPERAND, OPERATOR }; int GetType(char c) { if (c >= 'A' && c > str; stack st; for (int i = 0; i < str.length(); i++) { if (GetType(str[i]) == OPERAND) { cout