会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
WeiAR
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
14
15
16
17
18
19
20
21
22
···
56
下一页
2020年2月22日
CodeForces - 981D
摘要: CodeForces - 981D 从高位到低位去枚举,如果存在一种分配>=(ans|i),ans|=i;检验的时候用区间dp,f[i][j]表示前i个分成j段能不能成功,当然每一段都>=(ans|i) #include <iostream> #include <cstdio> #include <
阅读全文
posted @ 2020-02-22 20:17 WeiAR
阅读(146)
评论(0)
推荐(0)
2020年2月11日
https://vjudge.net/contest/356507#problem/C
摘要: 00001111在前i-1个全相等的情况下,对于位置i,如果a[i]!=a[i-1],要么把前i-1个反转,要么把n-(i-1)位置的反转。按位处理,每次从这两个情况里面取最大值。最后从这些最大值里取最小值就是答案 #include <iostream> #include <cstdio> #inc
阅读全文
posted @ 2020-02-11 17:49 WeiAR
阅读(371)
评论(0)
推荐(0)
2020年2月10日
CodeForces - 1201B
摘要: CodeForces - 1201B 首先和是偶数,最大的数要小于总和的一半 #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <cstring>
阅读全文
posted @ 2020-02-10 19:25 WeiAR
阅读(151)
评论(0)
推荐(0)
2019年11月7日
manacher模板
摘要: #include <iostream> #include <cstdio> #include <queue> #include <algorithm> #include <cmath> #include <cstring> #define inf 2147483647 #define N 41000
阅读全文
posted @ 2019-11-07 13:57 WeiAR
阅读(190)
评论(0)
推荐(0)
2019年11月4日
PyQt5安装
摘要: python3 -m pip install PyQt5 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
阅读全文
posted @ 2019-11-04 20:35 WeiAR
阅读(181)
评论(0)
推荐(0)
2019年9月20日
poj2777
摘要: poj2777区间修改,区间查询mark=-1表示这个区间有多种颜色,否则就1种
阅读全文
posted @ 2019-09-20 23:10 WeiAR
阅读(183)
评论(0)
推荐(0)
2019年9月4日
P1487 失落的成绩单
摘要: P1487 失落的成绩单a[i]=a[i-2]-2.0*a[i-1]+2.0*d;a[2]越大,a[3]越小a[3]越大,a[4]越小所以a[2]越大,a[4]越大,a[3]越小就有了单调性,分奇偶进行二分细节:二分的时候,l不一定为0,1e10为浮点数,eps小点好
阅读全文
posted @ 2019-09-04 17:18 WeiAR
阅读(179)
评论(0)
推荐(0)
2019年8月26日
P2290 [HNOI2004]树的计数
摘要: P2290 [HNOI2004]树的计数prufer序列模板题
阅读全文
posted @ 2019-08-26 17:03 WeiAR
阅读(176)
评论(0)
推荐(0)
prufer序列的性质及相关结论
摘要:
阅读全文
posted @ 2019-08-26 16:57 WeiAR
阅读(201)
评论(0)
推荐(0)
P1404 平均数
摘要: P1404 平均数二分答案,问题在于怎么O(n)check,把每个数都-mid,然后求前缀和,有点像最大子段和,精度问题的话就都乘1000
阅读全文
posted @ 2019-08-26 16:03 WeiAR
阅读(197)
评论(0)
推荐(0)
上一页
1
···
14
15
16
17
18
19
20
21
22
···
56
下一页
公告