목록2025/03/30 (2)
넘치게 채우기
https://www.acmicpc.net/problem/23300BOJ - 웹 브라우저 2문제 유형: 스택, 구현문제 난이도: Gold V시간 제한: 1초메모리 제한: 512MB 문제우리는 웹 페이지에 접속할 때 '웹 브라우저'를 사용한다. 웹 브라우저에는 크게 뒤로 가기(Backward), 앞으로 가기(Frontward), 웹페이지 접속(Access) 기능이 있다.사용자가 웹 사이트에 접속하면 컴퓨터의 캐시(cache)공간에 웹페이지 정보가 저장된다. 그리고 뒤로 가기 또는 앞으로 가기 기능을 사용하면 캐시 공간에 저장되어 있던 페이지의 정보를 불러오게 된다. 여기에 주헌이가 개발한 웹 브라우저에는 신기한 기능이 있는데, 바로 압축(Compress)이라는 기능이다. 압축 기능은 뒤로 가기 공간에 같은..
https://leetcode.com/problems/apply-operations-to-maximize-score/description/leetcode - Apply Operations to Maximize Score문제 유형: 모노토닉 스택, 스택, 그리디, 정수론, 정렬문제 난이도: Hard 문제You are given an array nums of n positive integers and an integer k.Initially, you start with a score of 1. You have to maximize your score by applying the following operation at most k times:Choose any non-empty subarray nums[l,..