摘要:
A .Secret of Chocolate Poles 题意:有黑白两种木块,黑色有1,K两种长度; 白色只有1一种长度,问满足黑白黑...白黑形式,长度为L的组合种类。 思路:直接DP即可。 #include<bits/stdc++.h> #define ll long long #define 阅读全文
摘要:
Alice get a string S. She thinks palindrome string is interesting. Now she wanna know how many three tuple (i,j,k) satisfy 1≤i≤j<k≤length(S) , S[i..j] 阅读全文
摘要:
Sample Input 6 1 a 1 b 2 a 2 c 3 4 8 1 a 2 a 2 a 1 a 3 1 b 3 4 Sample Output 4 5 4 5 11 题意:多组输入,开始字符串为空,支持4中操作: 1,在字符串首加字符; 2,在字符串尾加字符; 3,查询字符串不同本质的回文 阅读全文
摘要:
CA loves strings, especially loves the palindrome strings. One day he gets a string, he wants to know how many palindromic substrings in the substring 阅读全文
摘要:
A .Abstract Art 题意:求多个多边形的面积并。 思路:模板题。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const double inf=1e200; const double eps=1e- 阅读全文