上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 87 下一页
摘要: 给字符串 s 然后 Q 次询问 字符串 t 是不是 s 的子序列 序列自动机是用来判断是否是子序列的算法 时间复杂度是 $O(len)$ nx[i][j] 数组存的是在 s 中第 i 位后面第一个 j 字母出现的位置 阅读全文
posted @ 2019-05-06 15:57 丧心病狂工科女 阅读(1224) 评论(1) 推荐(0) 编辑
摘要: A. Stock Arbitraging Welcome to Codeforces Stock Exchange! We're pretty limited now as we currently allow trading on one stock, Codeforces Ltd. We hop 阅读全文
posted @ 2019-05-06 12:57 丧心病狂工科女 阅读(321) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/2-keys-keyboard/ Initially on a notepad only one character 'A' is present. You can perform two operations on this notepa 阅读全文
posted @ 2019-05-06 10:08 丧心病狂工科女 阅读(129) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/student-attendance-record-ii/ Given a positive integer n, return the number of all possible attendance records with leng 阅读全文
posted @ 2019-05-06 09:45 丧心病狂工科女 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/student-attendance-record-i/ You are given a string representing an attendance record for a student. The record only con 阅读全文
posted @ 2019-05-05 19:41 丧心病狂工科女 阅读(113) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/longest-uncommon-subsequence-ii/ Given a list of strings, you need to find the longest uncommon subsequence among them. 阅读全文
posted @ 2019-05-05 19:35 丧心病狂工科女 阅读(175) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/696#question A 代码: #include <bits/stdc++.h> using namespace std; int T; char c[10] = {'N', 'o', 'w', 'C', 'o', 'd' 阅读全文
posted @ 2019-05-05 18:01 丧心病狂工科女 阅读(125) 评论(0) 推荐(0) 编辑
摘要: A.ORZZJQ 代码: #include <bits/stdc++.h> using namespace std; int main() { printf("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 阅读全文
posted @ 2019-05-01 19:28 丧心病狂工科女 阅读(219) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int maxn = 3010; string s; int dp[maxn][maxn]; int main() { cin >> s; int len = s.length(); memset(dp, 0, sizeof(dp)); for(int i = len - 1; i >=... 阅读全文
posted @ 2019-04-29 16:36 丧心病狂工科女 阅读(295) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3068 Problem Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组c 阅读全文
posted @ 2019-04-29 15:34 丧心病狂工科女 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 87 下一页