原创 #649 (Div. 2)C. Ehab and Prefix MEXs(堆)

題目描述 Given an array a of length n, find another array, b, of length n such that: for each i (1≤i≤n) MEX({b1, b2, …

原创 #649 (Div. 2)B. Most socially-distanced subsequence

題目描述 Given a permutation p of length n, find its subsequence s1, s2, …, sk of length at least 2 such that: |s1−s2|

原创 #649 (Div. 2)D. Ehab‘s Last Corollary

題目描述 Given a connected undirected graph with n vertices and an integer k, you have to either: either find an indep

原创 #652 (Div. 2)D. TediousLee(畫圖找規律)

題目描述 Lee tried so hard to make a good div.2 D problem to balance his recent contest, but it still doesn’t feel goo

原创 #650 (Div. 3)C. Social Distance

題目描述 Polycarp and his friends want to visit a new restaurant. The restaurant has n tables arranged along a straigh

原创 #652 (Div. 2)B. AccurateLee(找規律)

題目描述 Lee was cleaning his house for the party when he found a messy string under the carpets. Now he’d like to mak

原创 #652 (Div. 2)C. RationalLee(貪心)

題目描述 Lee just became Master in Codeforces, and so, he went out to buy some gifts for his friends. He bought n inte

原创 #651 (Div. 2)B. GCD Compression

題目描述 Ashish has an array a of consisting of 2n positive integers. He wants to compress a into an array b of size n

原创 #651 (Div. 2)D. Odd-Even Subsequence

題目描述 Ashish has an array a of size n. A subsequence of a is defined as a sequence that can be obtained from a by d

原创 #651 (Div. 2)C. Number Game(博弈論,思維)

題目描述 Ashishgup and FastestFinger play a game. They start with a number n and play in turns. In each turn, a player

原创 #650 (Div. 3)D. Task On The Board

題目描述 Polycarp wrote on the board a string s containing only lowercase Latin letters (‘a’-‘z’). This string is know

原创 動態規劃(附dp的相關習題)

動態規劃是對解的最優化問題的一種途徑、一種方法,而不是一種特殊的算法。動態規劃往往是針對一種最優化問題的,由於各種問題的性質不同,確定最優解的條件也互不相同。因而動態規劃對於不同的問題,有各具特色的解體方法,而不存在一種萬能的動態

原创 #644 (Div. 3) D. Buying Shovels(約數)

題目描述 Polycarp wants to buy exactly n shovels. The shop sells packages with shovels. The store has k types of packa

原创 #646 (Div. 2)B. Subsequence Hate

題目描述 Shubham has a binary string s. A binary string is a string containing only characters “0” and “1”. He can per

原创 6.10訓練日記

這周ACM課結課了,經過了這個學期的學習,我也學到了很多的東西。我的水平也是有了一定的提升的。我的cf也有了一定的突破,雖然突破並不是很大,但相比之前也是有一些進步了。同時,這周acm隊的訓練也告一段落了,利用這段時間,可以進行自