摘要: 卡常 阅读全文
posted @ 2018-05-22 22:08 zZhBr 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Gremlins have infested the farm. These nasty, ugly fairy-like creatures thwart the cows as each one walks from the barn (conveniently located at 阅读全文
posted @ 2018-05-22 17:39 zZhBr 阅读(281) 评论(0) 推荐(5) 编辑
摘要: 题目描述 Bessie the cow is a hu e fan of card games, which is quite surprising, given her lack of opposable thumbs. Unfortunately, none of the other cows 阅读全文
posted @ 2018-05-17 21:55 zZhBr 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Farmer John has bought property in the Caribbean and is going to try to raise dairy cows on a big farm composed of islands. Set in his ways, he w 阅读全文
posted @ 2018-05-12 17:27 zZhBr 阅读(334) 评论(0) 推荐(0) 编辑
摘要: USACO Raucous Rockers 搜索水题 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> using namespace std; int n 阅读全文
posted @ 2018-05-07 22:00 zZhBr 阅读(125) 评论(0) 推荐(0) 编辑
摘要: bzoj 1096 斜率优化水题,( 闭着眼做) /************************************************************** Problem: 1096 User: BriMon Language: C++ Result: Accepted Tim 阅读全文
posted @ 2018-05-04 20:46 zZhBr 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目描述 永无乡包含 nnn 座岛,编号从 111 到 nnn ,每座岛都有自己的独一无二的重要度,按照重要度可以将这 nnn 座岛排名,名次用 111 到 nnn 来表示。某些岛之间由巨大的桥连接,通过桥可以从一个岛到达另一个岛。如果从岛 aaa 出发经过若干座(含 000 座)桥可以 到达岛 b 阅读全文
posted @ 2018-05-03 07:36 zZhBr 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Addition Chains Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5454 Accepted: 2923 Special Judge Description An addition chain for n is an 阅读全文
posted @ 2018-05-01 20:19 zZhBr 阅读(428) 评论(0) 推荐(3) 编辑
摘要: 一.Treap #include <bits/stdc++.h> using namespace std; const int SIZE = 100010; int INF = 0x7fffffff; int m, opt, x; int tot, root, n; struct Treap { i 阅读全文
posted @ 2018-04-30 23:12 zZhBr 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 并没有写序列翻转的板子; 【模板】普通平衡树(Treap/SBT) 阅读全文
posted @ 2018-04-30 22:13 zZhBr 阅读(136) 评论(0) 推荐(0) 编辑
摘要: //这里边没时间写的题一定会抽时间写了; 第一天 zrt神犇讲数据结构; 本部, 南校, 一中, 还有附中的朋友们都来了... 先是复习了寒假的数据结构(发现自己都忘了Orz); 好像第一次听说并查集的按秩合并,每次find的均摊复杂度降低到O(α(N)) , α(N)是反阿克曼函数(RE Tarj 阅读全文
posted @ 2018-04-28 22:10 zZhBr 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 左偏树(Leftist Tree)是一种可并堆的实现。左偏树是一棵二叉树,它的节点除了和二叉树的节点一样具有左右子树指针( left, right)外,还有两个属性,键值和距离(dist)。 键值:是用于比较节点的大小。 距离:节点i称为外节点(external node),当且仅当节点i的左子树或 阅读全文
posted @ 2018-04-28 20:47 zZhBr 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New Yea 阅读全文
posted @ 2018-04-28 19:58 zZhBr 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 题目描述 你有一支由 n 名预备役士兵组成的部队,士兵从 1 到 n 编号,要将他们拆分 成若干特别行动队调入战场。出于默契的考虑,同一支特别行动队中队员的编号 应该连续,即为形如 (i, i + 1, ..., i + k)(i,i+1,...,i+k) 的序列。 编号为 i 的士兵的初始战斗力为 阅读全文
posted @ 2018-04-27 21:06 zZhBr 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 算是一个总结吧! 先来一个模板; TYVJ 1305 最大子序和 题目描述 输入一个长度为n的整数序列,从中找出一段不超过M的连续子序列,使得整个序列的和最大。例如 1,-3,5,1,-2,3当m=4时,S=5+1-2+3=7当m=2或m=3时,S=5+1=6 输入输出格式 输入格式: 第一行两个数 阅读全文
posted @ 2018-04-26 21:23 zZhBr 阅读(236) 评论(0) 推荐(0) 编辑