上一页 1 2 3 4 5 6 ··· 24 下一页
摘要: #include #include #include #include using namespace std; const int N=2e4+5; const int INF=0x7fffffff; inline int read() { char c=getchar();int num=0; for(;!isdigit(c);c=getchar()); for(... 阅读全文
posted @ 2018-09-12 11:43 whymhe 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; const int N=5e3+5; int n,m,k; long long p[N]; long long sum[N]; long long dp[N][N]; int main() { scanf("%d%d%d",&n,&m... 阅读全文
posted @ 2018-09-12 11:42 whymhe 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int N=3e6+5; const int M=1e7+5; inline int read() { char c=getchar();int num=0; for(;!isdigit(c);c=getchar()); fo... 阅读全文
posted @ 2018-09-12 11:40 whymhe 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目背景 这是一道模板题 可以使用bitset,CDQ分治,K-DTree等方式解决。 题目描述 有 nn 个元素,第 ii 个元素有 a_iai​、b_ibi​、c_ici​ 三个属性,设 f(i)f(i) 表示满足 a_j \leq a_iaj​≤ai​ 且 b_j \leq b_ibj​≤bi 阅读全文
posted @ 2018-09-12 11:40 whymhe 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 题目描述 输入输出格式 输入格式: 输入文件名:TRO.IN 输入文件仅有一行,不超过500000个字符,表示一个二叉树序列。 输出格式: 输出文件名:TRO.OUT 输出文件也只有一行,包含两个数,依次表示最多和最少有多少个点能够被染成绿色。 输入输出样例 输入样例#1: 复制 112200201 阅读全文
posted @ 2018-09-12 11:39 whymhe 阅读(171) 评论(0) 推荐(0) 编辑
摘要: //P1032 字串变换 #include #include #include #include #include #include #include #include using namespace std; int n; string S,F; string ori[50],to[50]; int LS,LF; struct STA { string s; int a... 阅读全文
posted @ 2018-09-12 11:38 whymhe 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 题目描述 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置设定初始弹力系数ki,当绵羊达到第i个装置时,它会往后弹ki步,达到第i+ki个装置,若不存在第i+ki个装置,则 阅读全文
posted @ 2018-09-12 11:37 whymhe 阅读(214) 评论(0) 推荐(0) 编辑
摘要: //Pro:P2147 洞穴勘测 #include #include #include #include #include using namespace std; const int N=1e4+5; int c[N][2],f[N]; bool rev[N]; int st[N],t; inline bool get(int x) { return c[f[x]][1]==... 阅读全文
posted @ 2018-09-12 11:36 whymhe 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目背景 动态树 题目描述 给定n个点以及每个点的权值,要你处理接下来的m个操作。操作有4种。操作从0到3编号。点从1到n编号。 0:后接两个整数(x,y),代表询问从x到y的路径上的点的权值的xor和。保证x到y是联通的。 1:后接两个整数(x,y),代表连接x到y,若x到y已经联通则无需连接。 阅读全文
posted @ 2018-09-12 11:36 whymhe 阅读(218) 评论(0) 推荐(0) 编辑
摘要: // luogu-judger-enable-o2 #include #include #include #include using namespace std; const int N=3e5+5; int f[N],c[N][2]; bool rev[N]; int st[N],t; inline bool get(int x) { return c[f[x]][1]==x;... 阅读全文
posted @ 2018-09-12 11:35 whymhe 阅读(158) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 24 下一页