Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 투 포인터
- 정렬
- 백준
- 수학
- 문자열
- 유니티
- 자료구조
- ue5
- 알고리즘
- 다이나믹 프로그래밍
- 브루트포스
- 우선순위 큐
- XR Interaction Toolkit
- DFS
- Unreal Engine 5
- 유니온 파인드
- 재귀
- BFS
- 시뮬레이션
- 그래프
- 다익스트라
- VR
- Team Fortress 2
- 백트래킹
- 트리
- 그리디 알고리즘
- 구현
- 누적 합
- 스택
- c++
Archives
- Today
- Total
목록오큰수 C++ (1)
1일1알

스택을 쌓으면서 자기보다 큰 수를 만나면 pop하면서 전에 있는 수들까지 검사하는 식으로 문제를 풀었다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; vector arr(n); vector ans(n, -1); stack st; for (int i = 0; i < n;..
알고리즘
2022. 5. 31. 12:16