목록PS (871)
넘치게 채우기
https://leetcode.com/problems/make-sum-divisible-by-p/description/?envType=daily-question&envId=2024-10-03leetcode - Make Sum Divisible by P문제 유형 : 부분합, 해시문제 난이도 : Medium 문제Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed to remove the whole array.Return the length of the small..
https://www.acmicpc.net/problem/2942BOJ - 퍼거슨과 사과문제 유형 : 수학문제 난이도 : Silver II시간 제한: 1초메모리 제한: 128MB 문제맨체스터 유나이티드의 감독 퍼거슨은 빨간 사과를 R개, 초록 사과를 G개 가지고 있다. 훈련장에 있는 선수들 중 몇 명에게 나누어 주려고 한다. 단, 선수들이 서로 같은 개수의 사과를 받지 못하면 경기력 저하가 나타날 수 있으므로 모든 선수에게 같은 개수를 주려고 한다. 퍼거슨 감독은 사과를 싫어한다. 따라서 사과가 남으면 안 된다.예를 들어, 퍼거슨이 빨간 사과를 4개, 초록 사과를 8개 가지고 있다면, 다음과 같이 세가지 방법으로 나누어 줄 수 있다.선수 1명에게 빨간 사과 4개와 초록 사과 8개를 줄 수 있다.선수 2..
https://leetcode.com/problems/rank-transform-of-an-array/description/?envType=daily-question&envId=2024-09-27leetcode - Rank Transform of an Array문제 유형 : 정렬, 이진 탐색문제 난이도 : Easy 문제Given an array of integers arr, replace each element with its rank.The rank represents how large the element is. The rank has the following rules:Rank is an integer starting from 1.The larger the element, the larger the..
https://codeforces.com/contest/2013/problem/DCodeforces Round 973(Div. 2) - D. Minimize the Difference문제 유형 : 스택, 부분합, 그리디제한 시간: 2초제한 메모리: 256MB 문제Zhan, tired after the contest, gave the only task that he did not solve during the contest to his friend, Sungat. However, he could not solve it either, so we ask you to try to solve this problem.You are given an array a1,a2,…,an">𝑎1,𝑎2,…,𝑎?..
https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k/description/?envType=daily-question&envId=2024-10-01leetcode - Check If Array Pairs Are Divisible by K문제 유형 : 수학문제 난이도 : Medium 문제Given an array of integers arr of even length n and an integer k.We want to divide the array into exactly n / 2 pairs such that the sum of each pair is divisible by k.Return true If you can find a w..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/ljFHT/btsJQBPBbjD/XcNpiqKCvxq5EYCtoZJ4V1/img.png)
https://leetcode.com/problems/design-a-stack-with-increment-operation/description/?envType=daily-question&envId=2024-09-30leetcode - Design a Stack With Increment Operation문제 유형 : 구현, 스택문제 난이도 : Medium 문제Design a stack that supports increment operations on its elements.Implement the CustomStack class:CustomStack(int maxSize) Initializes the object with maxSize which is the maximum number of elem..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bBvVcR/btsJRohtSu1/slxISrkf9wAFkQTe7c6bl0/img.png)
https://leetcode.com/problems/all-oone-data-structure/description/?envType=daily-question&envId=2024-09-29leetcode - All O'one Data Structure문제 유형 : 해시, 구현문제 난이도 : Hard 문제Design a data structure to store the strings' count with the ability to return the strings with minimum and maximum counts.Implement the AllOne class:AllOne() Initializes the object of the data structure.inc(String key) Increme..
https://codeforces.com/contest/2013/problem/CCodeforces Round 973(Div. 2) - C. Password Cracking문제 유형 : 구현제한 시간: 2초제한 메모리: 256MB 문제Dimash learned that Mansur wrote something very unpleasant about him to a friend, so he decided to find out his password at all costs and discover what exactly he wrote.Believing in the strength of his password, Mansur stated that his password — is a binary string of..
https://leetcode.com/problems/design-circular-deque/description/?envType=daily-question&envId=2024-09-28leetcode - Design Circular Deque문제 유형 : 데크, 큐, 스택, 구현문제 난이도 : Medium 문제Design your implementation of the circular double-ended queue (deque).Implement the MyCircularDeque class:MyCircularDeque(int k) Initializes the deque with a maximum size of k.boolean insertFront() Adds an item at the front..
https://leetcode.com/problems/my-calendar-ii/description/?envType=daily-question&envId=2024-09-27leetcode - My Calendar II문제 유형 : 구현, 라인 스위핑문제 난이도 : Medium 문제You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a triple booking.A triple booking happens when three events have some non-empty intersection (i.e., some moment is common to a..