传送门:http://poj.org/problem?id=1651 Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13109 Accepted: 8034 Description The multiplication puzzle is played with a row of cards, each containing a single positive intege…
题目链接:https://vjudge.net/problem/POJ-1651 Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11239 Accepted: 6980 Description The multiplication puzzle is played with a row of cards, each containing a single positive…
Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regular brackets sequences, and if a and b are regul…
Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65535 K (Java/Others)Total Submission(s): 4513 Accepted Submission(s): 1935 Problem Description In mathematics, a subsequence is a sequence that can be derived f…
题目网址:https://www.luogu.com.cn/problem/P1063 题意大致是:给定一个序列An,第i个元组表示为(Ai,Ai+1),序列位置不变,当合并一个区间[l,l+1]时开销是Al*Al+1*Al+2,问合并整个序列的最大开销.一看就是区间dp,顺便借助记忆化减少搜索的冗余.题目中的项链是环状的,可以通过拼接相同的序列在元序列之后构造出一条链状的序列.这个问题与矩阵链相乘有点相似.代码如下: #include<bits/stdc++.h> using namespa…
Blocks Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5252 Accepted: 2165 Description Some of you may have played a game called 'Blocks'. There are n blocks in a row, each box has a color. Here is an example: Gold, Silver, Silver, Sil…
题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=5900 Description Every school has some legends, Northeastern University is the same. Enter from the north gate of Northeastern University,You are facing the main building of Northeastern University.…