목록2025/02/18 (3)
넘치게 채우기
https://codeforces.com/contest/2064/problem/DCodeforces Round 1005(Div. 2) - D. Eating문제 유형: 그리디, 비트마스킹, 이진 탐색시간 제한: 5초메모리 제한: 512MB 문제There are n">n slimes on a line, the i">i-th of which has weight wi">wi. Slime i">i is able to eat another slime j">j if wi≥wj">wi≥wj; afterwards, slime j">j disappears and the weight of slime i">i becomes wi⊕wj">wi⊕wj.The King of Slimes wants to ru..

https://www.acmicpc.net/problem/1300BOJ - K번째 수문제 유형: 매개변수 탐색(parametric search), 이진 탐색, 행렬문제 난이도: Gold I시간 제한: 2초메모리 제한: 128MB 문제세준이는 크기가 N×N인 배열 A를 만들었다. 배열에 들어있는 수 A[i][j] = i×j 이다. 이 수를 일차원 배열 B에 넣으면 B의 크기는 N×N이 된다. B를 오름차순 정렬했을 때, B[k]를 구해보자.배열 A와 B의 인덱스는 1부터 시작한다. 입력첫째 줄에 배열의 크기 N이 주어진다. N은 105보다 작거나 같은 자연수이다. 둘째 줄에 k가 주어진다. k는 min(109, N2)보다 작거나 같은 자연수이다. 출력B[k]를 출력한다. 풀이n이 정해져 있고 2D배열 A에..
https://leetcode.com/problems/construct-smallest-number-from-di-string/description/leetcode - Construct Smallest Number From DI String문제 유형: 백트래킹, 비트마스킹, 문자열 처리, 그리디문제 난이도: Medium 문제You are given a 0-indexed string pattern of length n consisting of the characters 'I' meaning increasing and 'D' meaning decreasing.A 0-indexed string num of length n + 1 is created using the following conditions:num..