上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 36 下一页
摘要: 参考 "这篇" 阅读全文
posted @ 2018-02-19 19:19 poorpool 阅读(121) 评论(0) 推荐(0)
摘要: 状压搜索轻轻松松就过了……考场上代码太丑了T了几个点 cpp include include include using namespace std; int n, m, uu, vv, ww, w[15][15], dis[15], dp[100005], ans; const int oo=0x 阅读全文
posted @ 2018-02-17 21:37 poorpool 阅读(121) 评论(0) 推荐(0)
摘要: 两遍 spfa 然后建立分层图拓扑排序 dp 一下。 写得很差劲。效率很低。 时间复杂度 $\mathrm{O}(Tnk)$。 参见 "这里" 秒懂。 阅读全文
posted @ 2018-02-15 19:46 poorpool 阅读(110) 评论(0) 推荐(0)
摘要: 先二分答案转化成判定问题。 考虑拿一根扫描线从 $x=0$ 扫到 $x=n$,每次移动扫描线更新每个位置它上面的点数和下面的点数,这样可以确定在当前的扫描线上哪些位置对于 $y$ 轴方向是合法的。对于 $x$ 轴方向合法的点应该处的范围可以直接算出来,树状数组维护。 cpp include incl 阅读全文
posted @ 2018-02-13 21:47 poorpool 阅读(142) 评论(0) 推荐(0)
摘要: 因为一个变化只会变化一个值,所以 $dp[i]=max(dp[j])+1,j include using namespace std; int n, m, zdz[100005], zxz[100005], a[100005], uu, vv, cnt, dp[100005], ans, rot[1 阅读全文
posted @ 2018-02-13 15:36 poorpool 阅读(147) 评论(0) 推荐(0)
摘要: ```cpp include include include include using namespace std; int n, m, a[50005], opt, uu, vv, ww, ans; const int oo=2147483647; namespace treap{ struct 阅读全文
posted @ 2018-02-12 21:52 poorpool 阅读(165) 评论(0) 推荐(0)
摘要: ```cpp include include using namespace std; int s[2000005][2], cnt, n, m, x, uu, ans, dep[2000005], siz[2000005]; void ins(){ int u=0; for(int i=19; i 阅读全文
posted @ 2018-02-11 21:12 poorpool 阅读(125) 评论(0) 推荐(0)
摘要: ```cpp include include include include using namespace std; typedef long long ll; int n, m; ll a[500005], uu, vv, lst, qzh[500005]; struct SGT{ ll sum 阅读全文
posted @ 2018-02-11 17:33 poorpool 阅读(568) 评论(0) 推荐(0)
摘要: ```cpp #include #include using namespace std; typedef long long ll; int n, m, T, uu, vv, ww; const int mod=1000000007; char ss[100005]; struct Matrix{ int ma[3][3]; Matrix operator * (const Matrix... 阅读全文
posted @ 2018-02-11 16:04 poorpool 阅读(113) 评论(0) 推荐(0)
摘要: 差分一下上线段树 阅读全文
posted @ 2018-02-11 10:33 poorpool 阅读(139) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 36 下一页