- 博客(17)
- 收藏
- 关注
转载 无题
大讨论题。。写了一点就弃疗了。。按权值大小枚举中间那个数,根据两边的值与中间那个值得大小关系可以分出3类,反过来又是三类,一共九类。。发现每个位置的贡献最多变化两次。。。发现要取最值不能离散化就弃疗了。。记个题号以后再补吧。。bzoj1099 1 #include <bits/stdc++.h> 2 3 using namespace std...
2017-07-03 20:44:00
72
转载 多项式exp
写了一发多项式exp,picks太神辣 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 typedef long long ll; 6 const int N = 262144,mod = 998244353,G = 3; 7 8 void read(in...
2017-05-26 21:48:00
162
转载 [BZOJ2555]SubString
SAM+LCT模板题。题目相当于求询问串在SAM上走到的状态的right集合大小,等于parent树上这个节点的子树中有多少前缀节点(right集合大小为1的节点)。因为强制在线,所以parent树用LCT维护。注意是维护子树和。代码还是非常好写的,也非常好想。#include <bits/stdc++.h>using namespace std;const i...
2017-04-27 16:06:00
132
转载 [BZOJ4135][FJOI2015]世界树
[BZOJ4135][FJOI2015]世界树describe奥丁杀死的巨人伊米尔后,从伊米尔的尸体上生长出来一株巨大的梣树,它是整个宇宙的核心,被称为世界之树,这个巨木的枝干构成了整个世界,它被神秘的奥术力量所守护。奥丁发现,世界树的每个节点至多有两棵子树,其蕴含的奥术力量是子树奥术力量的最大值+1,如果一个节点没有子树,其奥术力量为1,这些节点被称为“源”。世界树在悠长的岁月...
2017-04-19 20:17:00
139
转载 test
[x] a task list item[x] list syntax required[x] normal formatting, @mentions, #1234 refs[x] incomplete[x] completedthis is a dalaoThis is an example inline link.This link has no title at...
2017-04-19 09:51:00
63
转载 1036
未完待续 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 const int N = 30100; 6 7 int read(){ 8 int x = 0;char ch = getchar(); 9 while (ch < '...
2017-04-14 21:41:00
67
转载 sequence
惨遭卡常 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 typedef pair<int,pair<int,int> > pp; 6 const int N = 501000; 7 8 int read(){ 9 i...
2017-04-14 19:01:00
86
转载 stick
先mark优化排序#include <bits/stdc++.h>using namespace std;const int N = 50,M = 1200000;typedef long long ll;ll x[M],y[M];ll b[M],c[M],S,mx,mn,ans1,ans2;int T,n,a[N],len...
2017-04-12 17:34:00
82
转载 pro
代码#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 101000;struct Node{ double x,y; Node(){} Node(double x,double y):x(x),y(y){...
2017-03-09 17:40:00
77
转载 dna
长度不超过一半的最长回文后缀还不太会求。。先mark代码#include <bits/stdc++.h>using namespace std;const int N = 101000,A = 4,B = 5;struct Node{ int len,next[A],suf,fa; void clean(){ ...
2017-03-08 17:48:00
93
转载 回忆树
先上代码代码#include <bits/stdc++.h>/*a.长度不一定刚好是len*2-2,所以要计算kmp的长度 b.忘了返回值 */using namespace std;const int N = 101000,LOGN = 20,M = 301000;char read(){ char ch = get...
2017-03-06 16:52:00
188
转载 Goods transportation
题目来源:codeforces 724EDescriptionThere are n cities located along the one-way road. Cities are numbered from 1 to n in the direction of the road.The i-th city had produced pi units of goods...
2017-03-05 22:49:00
292
转载 最小公倍数
题目来源:Hnoi2016Day1T1/BZOJ4537Description 给定一张N个顶点M条边的无向图(顶点编号为1,2,…,n),每条边上带有权值。所有权值都可以分解成2^a*3^b的形式。现在有q个询问,每次询问给定四个参数u、v、a和b,请你求出是否存在一条顶点u到v之间的路径,使得路径依次经过的边上的权值的最小公倍数为2^a*3^b。注意:路径可以不是简...
2017-02-18 13:52:00
150
转载 2017占位1
2017开年占位相应的,会有2017年终占位转载于:https://www.cnblogs.com/victbr/p/6412908.html
2017-02-18 12:11:00
49
转载 Test
用于测试makedown#一级标题不支持的样子。。转载于:https://www.cnblogs.com/victbr/p/6412904.html
2017-02-18 12:09:00
59
转载 占位2
占位暂时想用作目录,或者索引什么的。mark一下。转载于:https://www.cnblogs.com/victbr/p/6412901.html
2017-02-18 12:08:00
66
转载 开坑纪念
开坑纪念。 学了5年OI,蓦然回首,却发现好像什么也没留下。写过的题、学过的算法,时间一长好像什么都记不太清。于是决定写点什么,作“到此一游”之用。 很早就有写博客的年头了。很久以前,在别人的推荐下,我点进了hzwer学长的博客,感觉那个球很厉害,于是萌生搭博客的年头。然而我等苣蒻,并无精力去研究要怎么自己搭建博客,更别说黄学长那些神奇的东西(暂且用这个词来表达)。于是给...
2017-02-18 12:05:00
70
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人