## 無目標的淡海輕軌一日遊

看天氣預報後，我認為這星期六大概是「今年夏天的最後一天」，就決定跑去好幾個月就想去的地方：淡海輕軌。 這是我第一次在沒有甚麼計畫的情況下去一個

## 第一次出在場次 Cosplay

三年前在開始有了自己的收入之後便想好好出個 Cos，但是都因為疫情推遲，而今年總算在 Cosplay 踏出了第一步。 FF39 2022/07/16 - 17 前置準備 在一個月前，我就列了前置準

## 146. LRU Cache

題目 LeetCode: 146. LRU Cache Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initialize the LRU cache with positive size capacity. int get(int key) Return the value of the key if the key exists, otherwise return -1. void put(int key, int value) Update the value of the key if the key exists. Otherwise, add the key-value

## 1694B. Paranoid String

題目 Codeforces: 1694B: Paranoid String Let’s call a binary string 𝑇 of length 𝑚 indexed from 1 to 𝑚 paranoid if we can obtain a string of length 1 by performing the following two kinds of operations 𝑚−1 times in any order : Select any substring of 𝑇 that is equal to 01, and then replace it with 1. Select any substring of 𝑇 that is equal

## 1694A. Creep

題目 Codeforces: 1694A: Creep Define the score of some binary string 𝑇 as the absolute difference between the number of zeroes and ones in it. (for example, 𝑇= 010001 contains 4 zeroes and 2 ones, so the score of 𝑇 is $|4−2|=2$). Define the creepiness of some binary string 𝑆 as the maximum score among all of its

## 1693A. Directional Increase

題目 Codeforces: 1693A: Directional Increase We have an array of length n. Initially, each element is equal to 0 and there is a pointer located on the first element. We can do the following two kinds of operations any number of times (possibly zero) in any order: If the pointer is not on the last element, increase the element the pointer is currently on by 1. Then move it

## 2306. Naming a Company

題目 LeetCode Problem You are given an array of strings ideas that represents a list of names to be used in the process of naming a company. The process of naming a company is as follows: Choose 2 distinct names from ideas, call them ideaA and ideaB. Swap the first letters of ideaA and ideaB with each other. If both of the new names are not found in the

## 2305. Fair Distribution of Cookies

題目 LeetCode Problem You are given an integer array cookies, where cookies[i] denotes the number of cookies in the ith bag. You are also given an integer k that denotes the number of children to distribute all the bags of cookies to. All the cookies in the same bag must go to the same child and cannot be split up. The unfairness of a distribution is defined as the

## 2289. Steps to Make Array Non-decreasing

題目 LeetCode Problem You are given a 0-indexed integer array nums. In one step, remove all elements nums[i] where nums[i - 1] > nums[i] for all 0 < i < nums.length. Return the number of steps performed until nums becomes a non-decreasing array. 說明 這題我在看完 Hint 後才想出來，所以紀錄一下。 一個元素

## 貓空攝影

纜車 樟樹步道 貓 貓空起源？ 橋旁的狸貓茶壺？