上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: description "BZOJ" "luogu" 给出一个1到n的全排列,现在对这个全排列序列进行m次局部排序,排序分为两种: $(0,l,r)$表示将区间$[l,r]$的数字升序排序 $(1,l,r)$表示将区间$[l,r]$的数字降序排序 最后询问第q位置上的数字。 data range $ 阅读全文
posted @ 2018-11-06 17:37 cjfdf 阅读(196) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-11-02 22:54 cjfdf 阅读(5) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-11-01 19:29 cjfdf 阅读(8) 评论(0) 推荐(0) 编辑
摘要: description "newcoder" 给你一个空的可重集合$S$。 $n$次操作,每次操作给出$x$,$k$,$p$,执行以下操作: $opt\ 1$:在S中加入x。 $opt\ 2$:输出 $$\sum_{y\in S}gcd(x,y)^k$$ data range 所有输入的数都是小于$ 阅读全文
posted @ 2018-10-26 22:48 cjfdf 阅读(263) 评论(0) 推荐(0) 编辑
摘要: description "newcoder" 你在一个无限长的数轴上,一开始你在原点 本来你只有两种操作:向左dp,以及向右dp 然而由于禁止dp 于是你只能另寻出路 万幸的是,dp之神随机给了你n个变量,既$x_1,x_2, ... , x_n$,每个变量的值在$[1,m]$之间,且是整数 每次你 阅读全文
posted @ 2018-10-19 22:51 cjfdf 阅读(352) 评论(0) 推荐(0) 编辑
摘要: description "洛谷" 求 $$max_{1\le i include include include include include include include include include include include include include include inclu 阅读全文
posted @ 2018-10-17 21:34 cjfdf 阅读(167) 评论(0) 推荐(0) 编辑
摘要: description "洛谷" 给出一个$n\times n$的黑白棋盘。 $m$次操作,每次将一个格子进行颜色翻转,求每次操作后的黑白四连通块数。 data range $$n\le 200,m\le 10000$$ solution 解决动态维护图连通性的方法有2种: 一种是通过$LCT$动态 阅读全文
posted @ 2018-10-15 20:32 cjfdf 阅读(208) 评论(0) 推荐(0) 编辑
摘要: description "洛谷" data range $$n\le 50$$ solution 相信几乎机房里的所有人都已经切掉了。。。 蒟蒻直到$NOIP2018$前夕才草草补上。。。 把路径$u v$拆成$u lca_{u,v}$和$lca_{u,v} v$两部分, 设$dep_u$为深度,$ 阅读全文
posted @ 2018-10-11 22:23 cjfdf 阅读(193) 评论(0) 推荐(0) 编辑
摘要: description "codeforces" 给一棵$n$个节点的树,每次等概率选择树中剩下边的一条进行缩边,这条边的两个端点有相同的概率被保留,求最后每个点被留下的概率。 data range $$n\le 50$$ solution 感谢 "Mr_Spade的博客" 教会了我做这道题。 考虑 阅读全文
posted @ 2018-10-09 18:53 cjfdf 阅读(761) 评论(0) 推荐(1) 编辑
摘要: description "洛谷" 给一棵树,要求支持单点权值修改,以及询问树上有多少个连通块的权值异或和恰好为$k$。 答案对$1e4+7$取模。 data range 设$2^m,q1,q2$分别为最大权值,修改次数和询问次数。 $$n,q1+q2\le 3\times 10^4,2^m incl 阅读全文
posted @ 2018-10-07 19:00 cjfdf 阅读(687) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 15 下一页