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 |
Tags
- 16202
- 3343
- graph #최단경로
- boj #백준
- 호반우 상인
- BOJ
- 20117
- graph
- 투포인터 #백준 #boj #20922 #22862
- c++ #입출력 #속도 #ios #sync_with_stdio #cin #cout #tie
- 3D #Reconstruction #computer #vision #volume #metric #tsdf #kinect #fusion
- C++
- 1174
- 22869
- 이분탐색 #dp #11053
- 사이클 없는 그래프
- 최소 #공배수 #최대 #공약수 #유클리드 #호제법 #lcm #gcd #c++ #boj #3343 #백준 #장미
- backtracking #codetree #디버깅 #삼성코테
- 백준
- 코딩
- hcpc
- 레드아보
- LIS #가장긴증가하는부분수열 #
- c++ #boj #
- 줄어드는수
- 백준 #다익스트라 #dijkstra #9370 #c++
- 쌤쌤쌤
- 진법변환 #2to10 #10to2 #이진법 #십진법 #변환 #bitset #c++
- N번째큰수
- 30870
Archives
- Today
- Total
목록투포인터 #백준 #boj #20922 #22862 (1)
hyunjin
[투포인터 BOJ20922 BOJ22862]
BOJ 20922 겹치는 건 싫어 O(N) #include #define MAX_N 200000 #define MAX_A 100001 using namespace std; int N, K; int arr[MAX_N]; int cnt[MAX_A]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> N >> K; for (int i = 0; i > arr[i]; int ans = 1; int left = 0, right = 0; while (right < N) { int num = arr[right]; if (cnt[num] < K) { cnt[num]++; } else { while (arr[left] !..
알고리즘 연습/백준
2024. 4. 20. 15:47