250x250
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
- CSS
- set
- priority_queue
- 힙덤프
- GC로그수집
- JPA
- dfs
- Union-find
- Java
- union_find
- map
- math
- 스택
- 큐
- html
- string
- deque
- sql
- 스프링부트
- spring boot
- scanner
- alter
- javascript
- BFS
- List
- NIO
- date
- 리소스모니터링
- Calendar
- Properties
Archives
- Today
- Total
목록c++원형큐 (1)
매일 조금씩

원형 큐 문제다. 큐 STL이 없었다면 front 와 rear 포인터를 사용해서 풀었겠지만 난 C++로 풀기 때문에 그럴필욘 없었다. 또한 vector로도 풀수 있다. 1. Queue로 푼 코드 #include #include #include #include using namespace std; int n ,k; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0);//cin 실행속도 향상 queue q; cin >> n >> k; for (int i = 1; i n >> m; vector *Per = new vector[n + 1]; // 1-based array for (int i = 0; i push_back(i); // Per = {0, 1, 2,..
알고리즘
2020. 4. 7. 17:12