摘要: 分块板题 #include<iostream> #include<cstdio> #define ri register int #define u long long namespace opt { inline u in() { u x(0),f(1); char s(getchar()); w 阅读全文
posted @ 2019-11-05 11:39 pai_hoo 阅读(116) 评论(0) 推荐(0) 编辑
摘要: f[i][j]表示用a[1]-a[i]与b[1]-b[j]并且用了b[j]构成的LCIS, 优化:决策集合只增不减,记录最优就行,n^3 -> n^2 读入不知道为啥只能cin,快读要炸第四个点 阅读全文
posted @ 2019-11-05 09:34 pai_hoo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 维护单调不上升栈,贪心 阅读全文
posted @ 2019-11-03 15:38 pai_hoo 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 什么玄学数组大小。。。开了10背才过 阅读全文
posted @ 2019-11-03 15:23 pai_hoo 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 概率dp入坑题 还以为打了多组数据,找错找了半小时。。。。。。。。 阅读全文
posted @ 2019-11-03 15:03 pai_hoo 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 离散化+缩水版线段树+扫描线思想 太毒瘤了 阅读全文
posted @ 2019-11-03 00:34 pai_hoo 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 建行连向列的单向边,跑最大匹配 阅读全文
posted @ 2019-11-02 17:09 pai_hoo 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 利用树状数组求第k大的数 具体就是标101010101010........ 统计1个数也就是前缀和 阅读全文
posted @ 2019-11-02 16:47 pai_hoo 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 同树状数组求逆序对思路 只不过要求4次(种) 阅读全文
posted @ 2019-11-02 16:18 pai_hoo 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 树状数组记录修改,差分 阅读全文
posted @ 2019-11-02 15:22 pai_hoo 阅读(135) 评论(0) 推荐(0) 编辑