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 | 31 |
Tags
- c++
- Material
- dfs
- 재귀
- python
- loop
- 문제풀이
- guide
- Tutorial
- 시작해요 언리얼 2022
- Programming
- 프로그래밍
- 오류
- parameter
- Class
- 파이썬
- dynamic
- W3Schools
- w3school
- github
- String
- UE5
- DP
- 기초
- C#
- Algorithm
- 백준
- Basic
- Unity
- Unreal Engine 5
Archives
- Today
- Total
목록1966 (1)
행복한 개구리
t = int(input()) for i in range(t): n, m = map(int, input().split()) prior = list(map(int, input().split())) prints = [[i, prior[i]] for i in range(n)] k = 0 cnt = 0 while True: if prints[0][1] == max(prior): cnt += 1 if prints[0][0] == m: print(cnt) break else: prints.pop(0) prior.remove(max(prior)) else: prints.append(prints.pop(0)) 큐의 특성인 FIFO(First In First Out)을 이용하여 가장 앞에 있는 명령의 중요도가 가장 우선..
Algorithm/BaekJoon
2022. 4. 2. 21:42