题目描述 God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them po ...
分类:
其他好文 时间:
2019-08-02 16:44:56
阅读次数:
68
最长回文子序列 题目链接 https://leetcode.com/problems/longest palindromic subsequence/ 给定一个字符串s,找到其中最长的回文子序列。可以假设s的最大长度为1000。 最长回文子序列和上一题最长回文子串的区别是,子串是字符串中连续的一个序 ...
分类:
其他好文 时间:
2019-07-31 10:58:45
阅读次数:
95
Transforming Sequence 给定$n,k$。 让你构造序列$a(0k$时就是无解,输出0。 大力DP 设$dp_{i,j}$表示前$i$个数占用了$j$个二进制位的方案数。注意这里不考虑占用的是哪几个二进制位,在最后乘以一个$\binom{k}{n}$就行了。 则不难列出转移方程: ...
分类:
其他好文 时间:
2019-07-30 21:43:34
阅读次数:
87
题目链接:http://codeforces.com/problemset/problem/1144/G 这个题和另外一个题非常相似,但是另外一个题比这个简单许多,有兴趣可以一起做一做。有题目和思路:https://www.cnblogs.com/xlbfxx/p/11255419.html 题意: ...
分类:
其他好文 时间:
2019-07-30 15:47:00
阅读次数:
65
The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n = 0. Given n, return the value of Tn. 我写的c ...
分类:
其他好文 时间:
2019-07-30 00:24:40
阅读次数:
85
题目传送门:[https://codeforces.com/gym/102059/problem/J](https://codeforces.com/gym/102059/problem/J) 题意: 给定一个直方图,一个长度为n的序列表示每个柱子的高度,有一个数组A记录着直方图中每个不同子矩形的面 ...
分类:
其他好文 时间:
2019-07-30 00:17:43
阅读次数:
125
原题:https://www.jianshu.com/p/289545760b13 ...
分类:
其他好文 时间:
2019-07-29 17:42:00
阅读次数:
159
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to large ...
分类:
编程语言 时间:
2019-07-28 22:44:35
阅读次数:
140
一、字符串拼接 str.join(sequence) 将序列(sequence)中的元素以指定的字符(_)连接生成一个新的字符串 运行结果: 二、Python自定义方法 1、str.center(width[, fillchar]) 返回一个指定的宽度 width 居中的字符串,fillchar 为 ...
分类:
编程语言 时间:
2019-07-28 20:06:41
阅读次数:
106
1137. N-th Tribonacci Number 1137. N-th Tribonacci Number The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn ...
分类:
其他好文 时间:
2019-07-28 14:08:03
阅读次数:
89