上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页
摘要: 新博客基本搭建好了,欢迎访问.aiyoupass.com 阅读全文
posted @ 2018-01-20 19:52 Grary 阅读(255) 评论(3) 推荐(1)
摘要: P2327 [SCOI2005]扫雷 题目描述 输入输出格式 输入格式: 第一行为N,第二行有N个数,依次为第二列的格子中的数。(1<=N<=10000) 输出格式: 一个数,即第一列中雷的摆放方案数。 输入输出样例 输入样例#1: 2 1 1 输出样例#1: 2 做法: 题解区大家都是八仙过海. 阅读全文
posted @ 2018-01-20 19:48 Grary 阅读(167) 评论(0) 推荐(0)
摘要: 2885 P2885 [USACO07NOV]电话线Telephone Wire 96 通过 254 提交 题目提供者 FarmerJohn2 标签 USACO2007 难度 提高+/省选- 时空限制 1s / 128MB 题目描述 Farmer John's cows are getting re 阅读全文
posted @ 2018-01-20 18:56 Grary 阅读(254) 评论(0) 推荐(0)
摘要: 题目背景 此处省略maxint+1个数 题目描述 在以后的若干天里戴维将学习美元与德国马克的汇率。编写程序帮助戴维何时应买或卖马克或美元,使他从100美元开始,最后能获得最高可能的价值。 输入输出格式 输入格式: 输入文件的第一行是一个自然数N,1≤N≤100,表示戴维学习汇率的天数。 接下来的N行 阅读全文
posted @ 2018-01-20 16:45 Grary 阅读(179) 评论(0) 推荐(0)
摘要: Link-Cut-Tree wcz¹ December31,2017 ¹Contactme:aiyoupass@outlook.com Contents 1DynamicTreeProblems[2]2 2Link-Cut-Trees[3]3 2.1Build.................... 阅读全文
posted @ 2018-01-14 20:42 Grary 阅读(209) 评论(0) 推荐(0)
摘要: 寻找树的重心 c++ include include include define N 1000004 define inf 0x3f3f3f3f using namespace std; void read(int &s){ char ch=getchar();int f=1; for(;!isd 阅读全文
posted @ 2018-01-02 18:08 Grary 阅读(140) 评论(0) 推荐(0)
摘要: 原文:来自Grary "Download" 分治算法在树的路径问题中的应用 关键字 : 树 路径 路径剖分 分治 数据结构 基于点的分治 首先选取一个点,将无根树转化为有根树,然后递归处理以根的儿子为根的子树。 基于边的分治 在树中选取一条边,将原树分成两棵不相交的树,递归处理。 效率分析 首先我们 阅读全文
posted @ 2018-01-02 16:26 Grary 阅读(355) 评论(0) 推荐(0)
摘要: 默默一看提交时间 …… 这是我以前的代码风格…… include include include include define N 10005 define lson(x) ((x v[N]; struct tree { int x,y,val; void read() { scanf("%d%d% 阅读全文
posted @ 2017-12-31 08:07 Grary 阅读(139) 评论(0) 推荐(0)
摘要: 复习一遍 include include include define N 150000 define For(i,x,y) for(int i=x;i 1; build(lson(p),L,MID); build(rson(p),MID+1,R); } void ins(int p,int x,i 阅读全文
posted @ 2017-12-30 21:56 Grary 阅读(120) 评论(0) 推荐(0)
摘要: 这不是一道LCT的题目 只是一道LCA+Kruskal的题目 只是货车运输的改进版都算不上 诶,好像有点问题 include include include include define N 10001 define inf 0x7fffffff using namespace std; bool 阅读全文
posted @ 2017-12-30 20:33 Grary 阅读(120) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页
博客园 首页 私信博主 编辑 关注 管理 新世界