随笔分类 - 动态规划:区间DP
摘要:描述 Clickomania is a puzzle in which one starts with a rectangular grid of cells of different colours. In each step, a player selects ("clicks") a cell
阅读全文
摘要:Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game
阅读全文
摘要:描述 Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic
阅读全文
摘要:Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it. You are given string s
阅读全文
摘要:When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for
阅读全文
摘要:The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The sho
阅读全文
摘要:We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brac
阅读全文
摘要:Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Hal
阅读全文
摘要:There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help
阅读全文
摘要:You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped parts for the invited com
阅读全文