목록PS (837)
넘치게 채우기
https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements/description/?envType=daily-question&envId=2024-12-13leetcode - Find Score of an Array After Marking All Elements문제 유형: 우선순위 큐문제 난이도: Medium 문제You are given an array nums consisting of positive integers.Starting with score = 0, apply the following algorithm:Choose the smallest integer of the array that is not marked. ..
https://www.acmicpc.net/problem/9910BOJ - Progress문제 유형: 수학, 다이나믹 프로그래밍, 브루트 포스문제 난이도: Silver I시간 제한: 2초메모리 제한: 1024MB 문제An arithmetic progression is an ascending sequence a of n numbers a1 such that the difference of two consecutive elements is always the same. Example: The sequence 11 Given is an ascending sequence c of k numbers c1 Example: Let c be the sequence 1 You can assume that the ..
https://leetcode.com/problems/take-gifts-from-the-richest-pile/description/leetcode - Take Gifts From the Richest Pile문제 유형: 우선순위 큐문제 난이도: Easy 문제You are given an integer array gifts denoting the number of gifts in various piles. Every second, you do the following:Choose the pile with the maximum number of gifts.If there is more than one pile with the maximum number of gifts, choose any.Leave be..
https://www.acmicpc.net/problem/1198BOJ - 삼각형으로 자르기문제 유형: 기하학, 브루트 포스문제 난이도: Silver II시간 제한: 2초메모리 제한: 128MB 문제볼록 다각형이 있고, 여기서 3개의 연속된 점을 선택해서 삼각형을 만든다. 그 다음, 만든 삼각형을 다각형에서 제외한다. 원래 다각형이 N개의 점이 있었다면, 이제 N-1개의 점으로 구성된 볼록 다각형이 된다. 위의 과정은 남은 다각형이 삼각형이 될 때까지 반복한다.볼록 다각형의 점이 시계 방향순으로 주어진다. 마지막에 남은 삼각형은 여러 가지가 있을 수 있다. 이때, 가능한 넓이의 최댓값을 구하는 프로그램을 작성하시오. 입력첫째 줄에 볼록 다각형 점의 수 N (3 ≤ N ≤ 35)이 주어진다. 둘째 줄부터 ..
https://leetcode.com/problems/maximum-beauty-of-an-array-after-applying-operation/description/leetcode - Maximum Beauty of an Array After Applying Operation문제 유형: 정렬, 슬라이딩 윈도우문제 난이도: Medium 문제You are given a 0-indexed array nums and a non-negative integer k.In one operation, you can do the following:Choose an index i that hasn't been chosen before from the range [0, nums.length - 1].Replace nums..
https://www.acmicpc.net/problem/1195BOJ - 킥다운문제 유형: 문자열 처리, 완전 탐색문제 난이도: Silver I시간 제한: 2초메모리 제한: 128MB 문제세계적으로 유명한 엄지민 자동차 회사는 효율적인 킥다운 장치를 만들어달라는 의뢰를 받았다. 킥다운이란 자동차에서 낮은 기어로 바꾸는 장치를 의미한다. 연구 끝에 효율적인 킥다운 장치는 '이'와 '홈'이 불규칙하게 배열되어 있는 기어로 만들어져야 한다는 것을 알았다.첫 번째 그림과 같이 두 기어 파트가 서로 마주보고 있게 된다. 튀어나온 것이 기어의 이, 들어간 곳이 홈이다. 그리고 이들을 두 번째 그림과 같이 서로 맞물리게 끼우는 것으로 킥다운 장치를 만들 수 있다. 하지만 문제는 맞물리게 하였을 때 가로 너비가 짧을..
https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-i/description/leetcode - Find Longest Special Substring That Occurs Thrice I문제 유형: 문자열 처리, 슬라이딩 윈도우문제 난이도: Medium 문제You are given a string s that consists of lowercase English letters.A string is called special if it is made up of only a single character. For example, the string "abc" is not special, whereas the stri..
https://www.acmicpc.net/problem/1005BOJ - ACM Craft문제 유형: 위상 정렬문제 난이도: Gold III시간 제한: 1초메모리 제한: 256MB 문제서기 2012년! 드디어 2년간 수많은 국민들을 기다리게 한 게임 ACM Craft (Association of Construction Manager Craft)가 발매되었다.이 게임은 지금까지 나온 게임들과는 다르게 ACM크래프트는 다이나믹한 게임 진행을 위해 건물을 짓는 순서가 정해져 있지 않다. 즉, 첫 번째 게임과 두 번째 게임이 건물을 짓는 순서가 다를 수도 있다. 매 게임시작 시 건물을 짓는 순서가 주어진다. 또한 모든 건물은 각각 건설을 시작하여 완성이 될 때까지 Delay가 존재한다. 위의 예시를 보자.이번..
https://leetcode.com/problems/special-array-ii/description/leetcode - Special Array II문제 유형: 이진 탐색문제 난이도: Medium 문제An array is considered special if every pair of its adjacent elements contains two numbers with different parity.You are given an array of integer nums and a 2D integer matrix queries, where for queries[i] = [fromi, toi] your task is to check that subarray nums[fromi..toi] is specia..
https://www.acmicpc.net/problem/1189BOJ - 컴백홈문제 유형: 백트래킹문제 난이도: Silver I시간 제한: 2초메모리 제한: 128MB 문제한수는 캠프를 마치고 집에 돌아가려 한다. 한수는 현재 왼쪽 아래점에 있고 집은 오른쪽 위에 있다. 그리고 한수는 집에 돌아가는 방법이 다양하다. 단, 한수는 똑똑하여 한번 지나친 곳을 다시 방문하지는 않는다. cdef ...f ..ef ..gh cdeh cdej ...f bT.. .T.e .Td. .Tfe bTfg bTfi .Tde a... abcd abc. abcd a... a.gh abc. 거리 : 6 6 6 8 8 10 6위..