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

2번 연산을 수행하던 3번 연산을 수행하던 수행하는 횟수만 다르고 결과는 같다. 둘중 아무거나로 연산한 뒤에 연산결과, 큐 용량 - 연산결과 중 작은 것을 고르면 된다. 그래서 굳이 덱으로 만들지 않고 큐로 2번 연산만 수행해서 풀었다. #include #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); ..
알고리즘
2022. 6. 5. 17:32