上一页 1 2 3 4 5 6 ··· 30 下一页
摘要: 吐槽:只能说是上分好场,可惜没打,唉 A:Beru-taxi (水题,取最小值) #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <que 阅读全文
posted @ 2016-08-12 18:49 shuguangzw 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 分析:这个题和bc round 73应该是差不多的题,当时是zimpha巨出的,那个是取phi,这个是开根 吐槽:赛场上写的时候直接维护数值相同的区间,然后1A,结果赛后糖教一组数据给hack了,仰慕 由于是开根,所以存在两个数刚开始差为1,加上某数再开根依旧是差1,这样维护相同数区间的就没用了 比 阅读全文
posted @ 2016-08-12 15:12 shuguangzw 阅读(321) 评论(0) 推荐(1) 编辑
摘要: 分析:怎么看都是超时,但是可以先筛一遍1e6以内的每个数的最小素数 算出每个数由多少个素数组成,然后应用,c[1e6][20] 就是题解的那一套,参照题解,比赛的时候没有想到好的办法筛一个数的因子,醉了 然后赛后发现,预处理因子肯定超时,虽然是O(nlogn)的,但是n是1e6啊,常数太大 而且单组 阅读全文
posted @ 2016-08-10 11:10 shuguangzw 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 严格按题解写,看能不能形成sum,只需要分割当前sum怎么由两边组成就好 #include <cstdio> #include <cstring> #include <cmath> #include <vector> #include <algorithm> using namespace std; 阅读全文
posted @ 2016-08-07 22:06 shuguangzw 阅读(297) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio> #include <cstring> #include <cmath> #include <vector> #include <algorithm> using namespace std; typedef long long LL; const int N = 阅读全文
posted @ 2016-08-07 22:03 shuguangzw 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 分析:大于等于m的变成1,否则变成0,预处理前缀和,枚举起点,找到第一个点前缀和大于m即可 找第一个点可以二分可以尺取 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace 阅读全文
posted @ 2016-08-07 21:58 shuguangzw 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 分析:维护空隙的差,然后预处理前缀最大,后缀最大,扫一遍 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; typedef long long LL; con 阅读全文
posted @ 2016-08-07 21:48 shuguangzw 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 分析:大于总和输出1 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; const int N = 1e5+5; int ret[N],T,n,m; 阅读全文
posted @ 2016-08-07 21:37 shuguangzw 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 分析:考虑贪心,考虑填ans[i],前i-1个合法,现在剩下一些数, 那么挑出出现次数最多的数,次数为mx,当前剩余总数为sum 如果sum-mx>=mx-1那么肯定有解,这个想想就知道了(这种题做过无数遍了) 考虑当前填的数,如果sum-mx=mx-1,那么只能填出现次数最多的数 否则,贪心选择和 阅读全文
posted @ 2016-08-07 15:09 shuguangzw 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题意:统计一段区间内不同的数的和 分析:排序查询区间,离线树状数组 #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> using namespace std; typedef long long LL 阅读全文
posted @ 2016-08-05 16:07 shuguangzw 阅读(278) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 30 下一页