Virus We have a log file, which is a sequence of recorded events. Naturally, the timestamps are strictly increasing. However, it is infected by a virus, so random records are inserted (but the order of original events is preserved). The backup log…
题意翻译 求两个串的最长公共上升子序列. 题目描述 This problem differs from one which was on the online contest. The sequence a1,a2,...,an is called increasing, if ai<ai+1 for i<n . The sequence s1,s2,...,sk is called the subsequence of the sequence a1,a2,...,an , if…
D. LCIS 题目连接: http://www.codeforces.com/contest/10/problem/D Description This problem differs from one which was on the online contest. The sequence a1, a2, ..., an is called increasing, if ai < ai + 1 for i < n. The sequence s1, s2, ..., sk is call…
LCIS模板 #include <cstdio> #include <cstring> #include <iostream> using namespace std; int n; long long a[3005],b[3005],f[3005]; int main() { scanf("%d",&n); for(int i=1; i<=n; i++) scanf("%lld",&a[i]); for(i…
题目描述 This problem differs from one which was on the online contest. The sequence a1,a2,...,an a_{1},a_{2},...,a_{n} a1,a2,...,an is called increasing, if ai<ai+1 a_{i}<a_{i+1} ai<ai+1 for i<n i<n i<n . The sequence s1,s2,...,sk s_{1…
题目:House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected a…