~~~~
题目意思问将序列 x 转化成序列 y 需要多少步操作。
题目链接:http://poj.org/problem?id=3356
~~~~
我的想法先求的两条序列的最长公共子序列。余下不相同或者是缺少的部分做相应的处理就好。
最长公共子序列都会吧,于是····
#include
#include
#include
#include
#define N 1000+10
using...
分类:
其他好文 时间:
2014-08-11 12:02:32
阅读次数:
238
Consider integer numbers from 1 to n. Let us call the sum of digits of an integer number its weight. Denote the weight of the number x as w(x).
Now let us order the numbers using so called graduated ...
分类:
其他好文 时间:
2014-08-10 18:47:20
阅读次数:
406
Cool Points We have a circle of radius R and several line segments situated within the circumference of this circle. Let’s define a cool point to be a...
分类:
其他好文 时间:
2014-08-10 12:37:10
阅读次数:
245
Sumdiv
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 13959
Accepted: 3433
Description
Consider two natural numbers A and B. Let S be the sum of all natur...
分类:
其他好文 时间:
2014-08-09 11:43:07
阅读次数:
226
Problem Description
Let A be an integral series {A1, A2, . . . , An}.
The zero-order series of A is A itself.
The first-order series of A is {B1, B2, . . . , Bn-1},where Bi = Ai+1 - Ai.
Th...
分类:
编程语言 时间:
2014-08-08 16:12:48
阅读次数:
200
1 shell变量基础shell变量是一种很“弱”的变量,默认情况下,一个变量保存一个串,shell不关心这个串是什么含义。所以若要进行数学运算,必须使用一些命令例如let、declare、expr、双括号等。shell变量可分为两类:局部变量和环境变量。局部变量只在创建它们的shell中可用。而环...
分类:
其他好文 时间:
2014-08-08 15:48:06
阅读次数:
329
I find it easiest to understand move semantics with example code. Let's start with a very simple string class which only holds a pointer to a heap-all...
分类:
其他好文 时间:
2014-08-08 15:39:06
阅读次数:
281
Description
Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:
1. Emergency 911
...
分类:
其他好文 时间:
2014-08-08 12:49:16
阅读次数:
187
Series 1
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 596 Accepted Submission(s): 214
Problem Description
Let A be an integ...
分类:
其他好文 时间:
2014-08-08 09:39:45
阅读次数:
299
Problem Description
Let A be an integral series {A1, A2, . . . , An}.
The zero-order series of A is A itself.
The first-order series of A is {B1, B2, . . . , Bn-1},where Bi = Ai+1 - Ai.
The ...
分类:
其他好文 时间:
2014-08-07 18:59:40
阅读次数:
248