Live2d Test Env
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 101 下一页
摘要: A .Secret of Chocolate Poles 题意:有黑白两种木块,黑色有1,K两种长度; 白色只有1一种长度,问满足黑白黑...白黑形式,长度为L的组合种类。 思路:直接DP即可。 #include<bits/stdc++.h> #define ll long long #define 阅读全文
posted @ 2019-02-13 21:01 nimphy 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 学习了“叙利亚”这个单词;比较温和的一场;几何的板子eps太小了,坑了几发。 A .Hello SCPC 2018! 题意:给定一个排列,问它是否满足,前面4个是有序的,而且前面4个比后面的都小。 思路:数据比较小,可以暴力,也可以用前面4个的最大值和后面的数字的最小值比较。 #include<bi 阅读全文
posted @ 2019-02-12 16:46 nimphy 阅读(689) 评论(0) 推荐(0) 编辑
摘要: C.Insertion Sort 题意:Q次询问,每次给出N,M,Mod,问你有多少种排列,满足前面M个数字排序之后整个序列的LIS>=N-1。 思路:我们把数字看成[1,M],[N-M+1,N]两个部分,假设是A和B。分几种情况即可。 我发现我好像想错了。 https://blog.csdn.ne 阅读全文
posted @ 2019-02-11 21:27 nimphy 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 题意:一个数的真因数指不包括其本身的所有因数,给定L,R,求这个区间的所有数的最大真因数之和。 思路:min25筛可以求出所有最小因子为p的数的个数,有可以求出最小因子为p的所有数之和。 那么此题就是对于所有素数因子,求它对应的和。 阅读全文
posted @ 2019-02-09 20:53 nimphy 阅读(717) 评论(0) 推荐(0) 编辑
摘要: B .Counting Inversion 题意:给定L,R,求这个区间的逆序对数之和。(L,R<1e15) 思路:一看这个范围就知道是数位DP。 只是维护的东西稍微多一点,需要记录后面的各种数字的个数cnt,以及逆序对和sum,以及出现了多少种后缀num。 那么枚举到当前位时,假设为i ,那么su 阅读全文
posted @ 2019-02-09 16:23 nimphy 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 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] 阅读全文
posted @ 2019-02-08 12:34 nimphy 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 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,查询字符串不同本质的回文 阅读全文
posted @ 2019-02-08 11:12 nimphy 阅读(363) 评论(0) 推荐(0) 编辑
摘要: Sample Input aca aaaa Sample Output 3 15 题意: 多组输入,每次给定字符串S(|S|<1e5),求多少对不相交的回文串。 思路:可以用回文树求出以每个位置结尾的回文串数,那么累加得到前缀和; 倒着再做一遍得到每个位置为开头的回文串数,乘正向求出的前缀和即可。 阅读全文
posted @ 2019-02-08 10:11 nimphy 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-02-07 20:37 nimphy 阅读(500) 评论(0) 推荐(0) 编辑
摘要: A .Abstract Art 题意:求多个多边形的面积并。 思路:模板题。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const double inf=1e200; const double eps=1e- 阅读全文
posted @ 2019-02-07 16:32 nimphy 阅读(511) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 101 下一页